Unit 4 Task 4 - Solution

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

Solution - Task 4: Zoo ticket total

← Back to task


One possible program:

def ticket_total(adults, children):
    return adults * 12 + children * 6

print(ticket_total(2, 3))