92.0k views
3 votes
The Boffo Balloon Company makes helium balloons. Large balloons cost $13.00 a dozen, medium-sized balloons cost $11.00 a dozen, and small balloons cost $8.60 a dozen. Customer order information includes customer name, quantity ordered, and size. This program should output the customer order information and total sales according to what and how many balloons they have ordered.

User Cameron
by
6.5k points

1 Answer

3 votes

Answer:

name = input("Enter customer name: ")

quantity = int(input("Enter quantity: "))

size = input("Enter size [large-medium-small]: ")

if size == "large":

sales = (quantity / 12) * 13

if size == "medium":

sales = (quantity / 12) * 11

if size == "small":

sales = (quantity / 12) * 8.6

print(name + " ordered " + str(quantity) + " " + size + " ballons")

print("Total sales is $" + str(sales))

Step-by-step explanation:

*The code is in Python.

Ask the user to enter name, quantity, and size

Check the size using if structure. Depending on the size, calculate the sales using the given cost for for a dozen.

Print the order information and total sales

User Scaraux
by
5.9k points