Sections › Coding › Loops and debugging
Loops and debugging
Loops save repeating yourself. Debugging is finding exactly where things went wrong. Both are everyday thinking tools.
What it looks like at each age
Ages 4–7
Spotting repeated patterns in songs and dances.
Ages 8–11
Shortening programs with loops, finding the line with the bug.
Ages 12–15
Nested loops, systematic testing, explaining bugs clearly.
Three things to try this week
- Find the repeating part of a favourite song.
- Write a dance as a program with loops.
- When something breaks, ask 'Which step went wrong?'
Activities for this topic

CodingAges 8–1135 minutesFamily plan
🔒 Grid Treasure Code
Write step-by-step code to move a 'robot' across a paper grid to the treasure. Find the bugs and shorten it with loops.
CodingAges 8–1160 minutesFamily plan