1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Arte-miy333 [17]
3 years ago
3

Write a program that asks the user how many frisbees they would like to buy, and then prints out the total cost. You should decl

are a constant at the top of your program called COST_OF_FRISBEE and set it equal to $15. Remember, constants should be formatted with all capital letters.
Be sure to include comments that describe the program’s behavior which is how the program functions and how the user interacts with it.

in python programming
Computers and Technology
1 answer:
S_A_V [24]3 years ago
3 0

#define the price of a frisbee

COST_OF_FRISBEE = 15

#get the number of frisbees the customer wants

frisnum = int(input("How many frisbees do you want: "))

#output cost

print(frisnum, "frisbees will cost", frisnum*COST_OF_FRISBEE)

You might be interested in
Write programs for two MSP430 boards to do the following:
Rainbow [258]

Answer:

Explanation:

#include "msp430g2553.h"

#define TXLED BIT0

#define RXLED BIT6

#define TXD BIT2

#define RXD BIT1

const char string[] = { "Hello World\r\n" };

unsigned int i; //Counter

int main(void)

{

WDTCTL = WDTPW + WDTHOLD; // Stop WDT

DCOCTL = 0; // Select lowest DCOx and MODx settings

BCSCTL1 = CALBC1_1MHZ; // Set DCO

DCOCTL = CALDCO_1MHZ;

P2DIR |= 0xFF; // All P2.x outputs

P2OUT &= 0x00; // All P2.x reset

P1SEL |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD

P1SEL2 |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD

P1DIR |= RXLED + TXLED;

P1OUT &= 0x00;

UCA0CTL1 |= UCSSEL_2; // SMCLK

UCA0BR0 = 0x08; // 1MHz 115200

UCA0BR1 = 0x00; // 1MHz 115200

UCA0MCTL = UCBRS2 + UCBRS0; // Modulation UCBRSx = 5

UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**

UC0IE |= UCA0RXIE; // Enable USCI_A0 RX interrupt

__bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ int until Byte RXed

while (1)

{ }

}

#pragma vector=USCIAB0TX_VECTOR

__interrupt void USCI0TX_ISR(void)

{

P1OUT |= TXLED;

UCA0TXBUF = string[i++]; // TX next character

if (i == sizeof string - 1) // TX over?

UC0IE &= ~UCA0TXIE; // Disable USCI_A0 TX interrupt

P1OUT &= ~TXLED; }

#pragma vector=USCIAB0RX_VECTOR

__interrupt void USCI0RX_ISR(void)

{

P1OUT |= RXLED;

if (UCA0RXBUF == 'a') // 'a' received?

{

i = 0;

UC0IE |= UCA0TXIE; // Enable USCI_A0 TX interrupt

UCA0TXBUF = string[i++];

}

P1OUT &= ~RXLED;

}

7 0
4 years ago
What is the most popular social networking service to date?
Fofino [41]
I think Face book hope that helped XD
6 0
3 years ago
Read 2 more answers
A disadvantage of creating a website with tables, without CSS is
ikadub [295]
I am just gonna yolo it... <span>each table has to be updated individually </span>
6 0
3 years ago
Read 2 more answers
What type of file is MyFile.dll?
vampirchik [111]

Answer:

The answer to this question is given below in the explanation section

Explanation:

A DLL  (Dynamic Link Library ) file is a compiled library that contains a set of procedures and/or drivers that are referenced and executed by a Windows program. It allows multiple programs to access shared functions through common libraries. DLL file has .dll extension at the end of file name.

When a program is launched, links to the necessary .dll files are created. If a static link is created, the .dll files will be in use as long as the program is active. If a dynamic link is created, the .dll files will only be used when needed. Dynamic links help programs use resources, such as memory and hard drive space, more efficiently. These files can be used in more than one program and in multiple programs at the same time. Some .dll files come with windows operating system while others are added as a new program is installed on system.

7 0
3 years ago
Read 2 more answers
QUESTION 7 of 20: What is it called when different seats are priced differently?
never [62]
Yield management pricing.
6 0
3 years ago
Other questions:
  • Which of the following software costs money?
    6·2 answers
  • Using illustration how input, process and output in latest wearable devices
    10·1 answer
  • By default, server manager does not connect with down-level servers (for example, windows server 2008). what must be done to pro
    13·1 answer
  • Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for
    14·1 answer
  • What is the result when you run the following program?<br> print("2 + 7')<br> print(3 + 1)
    6·2 answers
  • Farm equipment that travels on public roads
    14·2 answers
  • Why concurrency control is needed in transaction.
    5·1 answer
  • WILL MARK BRAINLIEST!!!!!!!!!!!
    5·2 answers
  • in an advertisement is made of a wireless keyboard and a mouse.Name two commonly used methods of connecting devices wirelessly​
    11·1 answer
  • When solving a problem in a group situation, which of the following traits should be demonstrated?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!