Unit 2 Task 5 - Solution

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Solution - Task 5: Zoo ticket price

← Back to task


One possible program:

age = int(input("Visitor age: "))

if age < 13:
    print("Child ticket: $8")
elif age >= 65:
    print("Senior ticket: $10")
else:
    print("Adult ticket: $15")