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?
- 2
- 5
- 4
- 3
Show answer
Answer: 2. The loop repeats "move →" 2 times, so the robot moves 2 squares.
2. How many squares does the robot move?
Show answer
Answer: 3. The loop repeats "move ←" 3 times, so the robot moves 3 squares.
3. How many squares does the robot move?
Show answer
Answer: 3. The loop repeats "move ↓" 3 times, so the robot moves 3 squares.
4. Match each long program to its loop.
- 👏 👏 👏 👏
- ⬆️ ⬆️
- ➡️ ➡️ ➡️
- repeat 2 × ⬆️
- repeat 3 × ➡️
- repeat 4 × 👏
Show answer
Answer: ➡️ ➡️ ➡️ → repeat 3 × ➡️ · ⬆️ ⬆️ → repeat 2 × ⬆️ · 👏 👏 👏 👏 → repeat 4 × 👏. A loop repeats steps so the program is shorter.
Tips for grown-ups
- Play a “repeat” game: “Repeat 4: clap, stamp!”
- Spot loops in songs with repeating choruses.