A loop tells a computer to repeat something. Instead of writing “move right, move right, move right”, a programmer writes “repeat 3: move right”. Year 1 coders read short loops and work out what the robot does.
What your child will learn
- Know that a loop repeats instructions
- Work out how many steps a simple loop makes
- Choose the loop that matches a list of repeated moves
Less code, same job
Loops save time and make programs easier to read. They also make changes easy: to take five steps instead of three, you only change one number.
Example questions
Here are a few questions like the ones in the first quest. Can you solve them?
1. How many squares does the robot move?
- 5
- 1
- 3
- 4
Show answer
Answer: 3. The loop repeats "move →" 3 times, so the robot moves 3 squares.
2. How many squares does the robot move?
Show answer
Answer: 2. The loop repeats "move ↑" 2 times, so the robot moves 2 squares.
3. True or false? The robot moves 2 squares.
Show answer
Answer: True. The loop repeats "move ↓" 2 times, so the robot moves 2 squares.
Tips for grown-ups
- Play a “repeat” game: “Repeat 4: clap, stamp!”
- Spot loops in songs with repeating choruses.