Theme Park Turnstile Prizes
A theme park gives out prizes to every visitor entering through the turnstile, numbered v from 1 to 30:
- Every 3rd visitor gets a
"FastPass" - Every 10th visitor gets a
"Free meal" - Visitors who are both a multiple of 3 and 10 (i.e. 30) get a
"VIP upgrade"instead - Everyone else gets
"Standard entry"
State the Python code that should replace labels L1, L2, and L3 below. (3 marks)
v = 1
while v <= 30:
if v % 30 == 0:
print("VIP upgrade")
elif [ L1 ]:
print("Free meal")
elif v % 3 == 0:
[ L2 ]
else:
[ L3 ]
v = v + 1