← Years 5–6 Creating Digital Solutions

Iteration: repeating steps

Repeating a set of steps instead of writing them out again and again. The repeated steps are called the loop body. Loops save effort.

Understanding Iteration: repeating steps in Years 5–6 Creating Digital Solutions

What it does: Writing jump once inside a loop replaces writing jump five times in a row. Step forward is repeated three times in a row. This is a sign that a loop could replace it. Iteration means repeating a set of steps. It is another word for looping. Loops save effort. We write the steps once and the computer repeats them. A square has 4 matching sides, so we repeat 'draw a line, turn right' 4 times.

Common mistakes: A loop must say how many times to repeat. The first line should be REPEAT 4 TIMES so the loop body runs 4 times. The keyword that starts a loop is REPEAT, not REPLAY. It should be REPEAT 10 TIMES.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 11–20) and word search (Modules 1–20).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which one is an example of iteration?
Doing each step once and then stoppingRepeating the same steps instead of writing them out again
Matches
REPEAT 3 TIMES clap stomp
↓
The loop body is not clearly shown. The steps to repeat should be indented under REPEAT so we know which steps are in the loop.
Applying
Meanings
Term
iteration
Meaning
Repeating a set of steps instead of writing them out again and again. The repeated steps are called the loop body. Loops save effort.
Practice
REPEAT 5 TIMES
Testing
Gaps
4 TIMES
Check Answer
Spots
1REPEAT TIMES
2 Move forward 10

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Galaxy Phoenix' badge — Orbit Champion, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which one is an example of iteration?
A. Doing each step once and then stopping
B. Repeating the same steps instead of writing them out again ✓
Iteration means repeating a set of steps. It is another word for looping.
2. You write: clap, clap, clap, clap, clap. How could you write this with iteration?
A. REPEAT 5 TIMES: clap ✓
B. clap 5 TIMES REPEAT
A loop says how many times to repeat, then lists the step to repeat. This is shorter than writing clap five times.
3. Why do programmers use loops?
A. Loops save effort because we don't write the same steps again and again ✓
B. Loops make a computer forget the steps it already did
Loops save effort. We write the steps once and the computer repeats them.
4. The steps that get repeated inside a loop are called the...
A. loop ending
B. loop body ✓
The loop body is the set of steps that are repeated each time around the loop.
5. Which list of steps has a repeated pattern you could turn into a loop?
A. step forward, turn, step forward, turn, step forward, turn ✓
B. wake up, eat breakfast, brush teeth, catch the bus
Look for steps that appear again and again. Forward and turn repeats three times, so a loop can do it.

Match the Pairs

REPEAT 4 TIMES → Iteration: the steps inside are repeated 4 times, so you don't write them out four times
REPEAT 3 TIMES clap → The loop body is the clap step, because it is the part that gets repeated
Loops save effort: one loop does the work of writing the same steps many times → REPEAT 5 TIMES jump
Spotting repeated steps: the same steps appear over and over, so they can go in a loop → step forward step forward step forward
REPEAT 3 TIMES clap stomp → The loop body is not clearly shown. The steps to repeat should be indented under REPEAT so we know which steps are in the loop.
wave wave wave wave wave → The same step is written out again and again. A loop like REPEAT 5 TIMES with wave inside would save effort.

Key Term

iteration
Repeating a set of steps instead of writing them out again and again. The repeated steps are called the loop body. Loops save effort.

Fill in the Blanks

1. REPEAT 4 TIMES clap END REPEAT
Hint: Type the keyword that starts a loop.
2. // Stomp 5 times REPEAT 5 TIMES stomp
Hint: Type the number of times the steps repeat, using the comment.
3. // Clap 3 times REPEAT 3 TIMES clap
Hint: Type the action in the loop body that gets repeated.
4. REPEAT 6 TIMES jump END REPEAT
Hint: Type the word that comes after the number of repeats.
5. REPEAT 3 TIMES spin END REPEAT
Hint: Type the word that closes the loop, matching how it began.

Spot the Error

Question 1
A REPEAT TIMES
B Move forward 10
C Turn right 90
D END REPEAT
Line A — A loop must say how many times to repeat. The first line should be REPEAT 4 TIMES so the loop body runs 4 times.
Question 2
A Pick up the toothbrush
B REPLAY 10 TIMES
C Brush one tooth
D END REPEAT
E Rinse your mouth
Line B — The keyword that starts a loop is REPEAT, not REPLAY. It should be REPEAT 10 TIMES.
Question 3
A Get a skipping rope
B REPEAT 20 TIMES
C Jump over the rope
D STOP REPEAT
E Put the rope away
Line D — The loop body must be closed with END REPEAT. STOP REPEAT is not the right ending, so line 4 should be END REPEAT.
Question 4
A Collect the blocks
B REPEAT 8 TIMES
C Knock the tower down
D END REPEAT
Line C — The loop body is the step that gets repeated, and it should help build the tower. Line 3 should be Stack one block, not knocking the tower down.
Question 5
A # Draw a triangle
B REPEAT 4 TIMES
C Move forward 50
D Turn right 120
E END REPEAT
Line B — A triangle has 3 sides, so the loop body must repeat 3 times. Repeating 4 times would draw too much. It should be REPEAT 3 TIMES.

Student with a class code? Join your class →