159k views
3 votes
Python;

Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from ticket sales. There are three seating categories at the stadium. Class A seats costs $20, Class B seats cost $15, and Class C seats cost $10.

User Amaris
by
6.0k points

1 Answer

3 votes

a = int(input("Class A tickets sold: "))

b = int(input("Class B tickets sold: "))

c = int(input("Class C tickets sold: "))

print("Total income generated: $"+str((a*20)+(b*15)+(c*10)))

I hope this helps!

User Liren Yeo
by
5.6k points