asked 60.1k views
2 votes
There are three seating categories at a stadium for a softball game, class a seats cost$15, class b seats costs $12, and class c seats costs $9. Design a modular program that asks how many tickets for each class of seats were sold, and then displays the amount of income generated from ticket sales.

1 Answer

5 votes
def optionsIncome():
aSeats = int(input("How many Class A seats were sold? "))
bSeats = int(input("How many Class B seats were sold? "))
cSeats = int(input("How many Class C seats were sold? "))
totalIncome = aSeats * 15 + bSeats * 12 + cSeats * 9
print("The total income generated from ticket sales is $" + str(totalIncome) + ".")

optionsIncome()
answered
User Sagar Gautam
by
7.1k points