Kodewick
Start learning →
Starter←→0 / 100

Ticket price

#006StarterConditionsNumbers2 min

At the cinema, under-12s pay 30 and everyone else pays 50. Write ticket_price(age) to return what this person pays.

Examples
ticket_price(8)→30
ticket_price(30)→50
main.py
def ticket_price(age):
    # your code here: under 12 returns 30, otherwise 50
    pass
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.