Pack 2 / Logic
else
Lesson pack2-2
else
not started
Hook
else handles the other path so the program always knows what to do.
else pairs with if.
Use it for the fallback outcome.
It keeps your logic complete and easier to read.
Mini Challenge
Set has_ticket = False. If true print "Ride now", else print "Buy a ticket".
Full lesson mode with normal detail.
Code Lab
Try it now
Output updates below
Output
Chest locked
Run the code, tweak it, then beat the challenge.
