71.8k views
1 vote
Write a program that asks the user how many frisbees they would like to buy, and then prints out the total cost. You should declare 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

1 Answer

5 votes

#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)

User Nonsensickle
by
5.1k points