top of page
< Back

Cinema Ticket Price Calculator

A cinema needs a program to calculate ticket prices based on age:

- Children (under 12): £5.00
- Teens (12-17): £7.50
- Adults (18-64): £10.00
- Seniors (65+): £6.00

# Ticket price categories 

CHILD_PRICE = 5.00 

TEEN_PRICE = 7.50 

ADULT_PRICE = 10.00 

SENIOR_PRICE = 6.00 


# =====> Take input for a list of ages 


# =====> Apply pricing logic based on age categories 


# =====> Calculate total cost 


# =====> Display the final total

Example Outputs:
Enter ages (comma-separated): 10,15,30,70
Total cost: £28.50

Enter ages (comma-separated): 5,18,65
Total cost: £21.00

bottom of page