Deviopath › Python

Cinema Ticket Price

Easy · Conditions

Python lets you chain comparisons, so 3 <= age < 13 reads just like math.

Write a function ticket_price(age) that returns the price of a cinema ticket: children under 3 go free (0), ages 3 to 12 pay 8, ages 13 to 64 pay 15, and people aged 65 or older pay 10.

Next: Leap Year