Loops for kids: HDB Void Deck

Water every plant along the corridor without dragging out 20 arrows.

Free · no sign-up · ages 6–12 · works on Chromebooks and iPads

123123123123123123

What are loops?

A loop tells the computer to do the same thing again and again. Instead of writing "move right" nine times, you write it once and wrap it in "repeat 9". Loops make programs shorter and easier to read, and much easier to change. If the corridor grows to 20 squares, you change one number instead of adding eleven blocks.

At the HDB void deck, the neighbours have lined the corridor with potted plants, and your robot is on watering duty. The first levels can be solved the long way, with lots of arrows. To earn all three stars, you have to spot the pattern that repeats and put it in a loop.

Spotting patterns is one of the most useful skills in coding. Later levels put a loop inside another loop (a "nested loop") to walk up and down rows, the same trick programmers use to go through every pixel in a picture or every cell in a spreadsheet.

Ready to Start Building?

Book a free 45-minute trial class. No commitment, no credit card — just great learning.