Program to calculate prices of tickets.
Matinee and Evening pricing
Discounts for children and seniors
Tickets are $15 for Matinee and $20 for Evening
Children and seniors get a $10 discount for both
Children is 12 and under; Senior is 55 and above
Write a program to calculate the total price of tickets for these choices.
I tried this as a base but I’m not sure if this is even the right code to use and how to convert it with my problem
prompt = “nEnter ‘quit’ when you are finished.”
prompt += “nPlease enter your age: “
while True:
age = input(prompt)
age = int(age)
if age == 'quit':
break
elif age <= 3:
print("Your ticket is free")
elif age <= 10:
print("Your ticket is $10")
else:
print("Your ticket is $15")
New contributor