Loops, If-Else & Functions for kids: Changi Airport
Sort luggage onto the right belts with loops, conditions and functions.
Free · no sign-up · ages 6–12 · works on Chromebooks and iPads
How do loops, conditions and functions work together?
Real programs rarely use just one idea. They put conditions inside loops, and loops inside functions, building big behaviour out of small pieces. This world brings together everything from the earlier worlds: sequencing, loops, conditions and functions.
At Changi Airport the bags come off the carousel one at a time, red or blue, and every bag has to go on the belt that matches its colour. Your robot can't know the order in advance, so it has to check each bag with a condition. Then a loop handles every bag, and a sort_bag function keeps the program short and readable.
If your robot can sort the luggage, you have used the same building blocks as every app, game and website. Press "Show me the Python" on any level to see your blocks as real Python code, the language our older students use to build their own AI.
The levels
- Level 1 Check-in One red bag on the carousel. Pick it up and put it on the red belt.
- Level 2 Holiday Rush Four red bags this time. Loop the trip.
- Level 3 Red or Blue? Mixed bags! Check the colour of each bag before you drop it.
- Level 4 Long Belts The belts are further away now. Loops can go inside the if and the else too.
- Level 5 sort_bag() Nobody knows how many bags are coming. Teach the robot sort_bag once, then repeat it until the carousel is empty.
- Level 6 Two Carousels Two carousels, two bags each. Your sort_bag function works at both.
- Secret bonus Lost & Found Get three stars on all six levels to unlock it.
Teachers: link straight to any level, like dotcodecampus.com/maze/changi/3, and put it up on the projector.
Ready to Start Building?
Book a free 45-minute trial class. No commitment, no credit card — just great learning.
