Price at the Box Office

Python FundamentalsMedium+10 XP+10

Price at the Box Office

A cinema charges by age:

AgePrice
under 50 (free)
5 to 126
13 to 6410
65 or older7

Write a function ticket_price(age) that returns the price as a whole number.

Watch the edges: age 5 pays 6, age 13 pays 10, and age 65 pays 7.

Examples

age = 3
returns 0
age = 30
returns 10
age = 70
returns 7

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run