← ACARA Digital Technologies Years 5–6

Spotting a repeating pattern

Same steps that appear again and again. Replace them with one loop to make the algorithm shorter, with the same result.

Understanding Spotting a repeating pattern in ACARA Digital Technologies Years 5–6

What it does: Draw line then Turn right 90 is the repeating pattern for a square. The loop does it 4 times with the same result and fewer lines. The steps 'clap, stomp' appear four times in a row. One loop can repeat them 4 times instead of writing them out. The pair 'plate, fork' is the group of steps that repeats. This pair goes inside the loop. A loop should take the place of the repeated steps. Keeping both makes the algorithm longer and changes the result.

Common mistakes: A square has 4 equal sides, so the same two steps (move, turn) must repeat 4 times. It should be REPEAT 4 TIMES. The long dance was clap, stomp done 3 times. REPEAT 6 TIMES would do the pattern twice as often, so the result is different. It should be REPEAT 3 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 106–119) and word search (Modules 106–132).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which algorithm has a repeating pattern that could be replaced by a loop?
Clap, spin, jump, bow, wave, stomp, sit, standClap, stomp, clap, stomp, clap, stomp, clap, stomp
Matches
REPEAT 2 TIMES Spin END REPEAT (original: Spin 4 times)
↓
The loop count does not match the original. Spin was written 4 times, so it must be REPEAT 4 TIMES to get the same result.
Applying
Meanings
Term
repeating pattern
Meaning
Same steps that appear again and again. Replace them with one loop to make the algorithm shorter, with the same result.
Practice
REPEAT 4 TIMES
Testing
Gaps
3 TIMES
Check Answer
Spots
1REPEAT 3 TIMES
2 Move forward 10

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

The 'Starfish' badge — Five-Point Star, 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 algorithm has a repeating pattern that could be replaced by a loop?
A. Clap, spin, jump, bow, wave, stomp, sit, stand
B. Clap, stomp, clap, stomp, clap, stomp, clap, stomp ✓
The steps 'clap, stomp' appear four times in a row. One loop can repeat them 4 times instead of writing them out.
2. A student draws a square with: forward 10, turn 90, forward 10, turn 90, forward 10, turn 90, forward 10, turn 90. Which loop gives the same result?
A. REPEAT 8 times: forward 10, turn 90
B. REPEAT 4 times: forward 10, turn 90 ✓
The pair 'forward 10, turn 90' happens 4 times. Repeating it 8 times would draw too much, so the result would not be the same.
3. What is the main reason for replacing a repeating pattern with a loop?
A. The algorithm becomes shorter but gives the same result ✓
B. The algorithm gives a different result
A loop is a shortcut. The steps are written once, and the result stays exactly the same.
4. You are setting a table for 5 people: put down a plate, put down a fork, put down a plate, put down a fork, and so on 5 times. What is the repeating pattern?
A. Put down a plate, put down a fork ✓
B. Put down a spoon
The pair 'plate, fork' is the group of steps that repeats. This pair goes inside the loop.
5. Which list of steps does NOT have a repeating pattern?
A. Hop, turn, clap, bow, wave ✓
B. Hop, turn, hop, turn, hop, turn
In the first list, no group of steps repeats, so a loop would not help. In the second list, 'hop, turn' repeats 3 times.

Match the Pairs

REPEAT 4 TIMES Clap END REPEAT → One loop that replaces Clap, Clap, Clap, Clap. It is shorter and gives the same result.
Step forward, Step back, Step forward, Step back → A repeating pattern: the pair Step forward, Step back appears twice, so a loop could replace it.
Drawing a square has the same two steps four times, so one loop can replace them. → REPEAT 4 TIMES Draw line Turn right 90 END REPEAT
Setting a table for 3 people repeats the same steps, so one loop makes the algorithm shorter. → REPEAT 3 TIMES Put down plate Put down fork END REPEAT
REPEAT 2 TIMES Spin END REPEAT (original: Spin 4 times) → The loop count does not match the original. Spin was written 4 times, so it must be REPEAT 4 TIMES to get the same result.
Draw line, Turn 90, Draw line, Turn 90 REPEAT 2 TIMES Draw line Turn 90 END REPEAT → The steps were written out AND put in a loop. This does the pattern twice as often, so the loop should replace the repeated steps, not be added to them.

Key Term

repeating pattern
Same steps that appear again and again. Replace them with one loop to make the algorithm shorter, with the same result.

Fill in the Blanks

1. REPEAT 3 TIMES clap END REPEAT
Hint: Type the keyword that makes the same dance move run again, so three claps need only one loop.
2. REPEAT 4 TIMES draw line, turn right 90 END REPEAT
Hint: Type the number of times the side-and-turn steps repeat to draw a square.
3. REPEAT 4 TIMES put plate, put fork END REPEAT
Hint: Type the word after the number that says how often to set each place at the table.
4. REPEAT 6 TIMES hop END REPEAT
Hint: A dance has six hops in a row. Type the number that gives the same result as writing hop six times.
5. REPEAT 3 TIMES draw line, turn right 120 END REPEAT
Hint: Type the two words that close the loop after the repeating steps for a triangle.

Spot the Error

Question 1
A REPEAT 3 TIMES
B Move forward 10
C Turn right 90
D END REPEAT
Line A — A square has 4 equal sides, so the same two steps (move, turn) must repeat 4 times. It should be REPEAT 4 TIMES.
Question 2
A Start the dance
B REPEAT 6 TIMES
C Clap
D Stomp
E END REPEAT
Line B — The long dance was clap, stomp done 3 times. REPEAT 6 TIMES would do the pattern twice as often, so the result is different. It should be REPEAT 3 TIMES.
Question 3
A SET people TO 4
B REPEAT 5 TIMES
C Put out a plate
D Put out a fork
E END REPEAT
Line B — There are 4 people, so the plate and fork steps should repeat 4 times. REPEAT 5 TIMES sets an extra place. It should be REPEAT people TIMES.
Question 4
A REPEAT TIMES
B Jump
C Spin
D END REPEAT
Line A — A loop needs to say how many times to repeat. The number is missing. It should be REPEAT 5 TIMES.
Question 5
A Pen down
B REPEAT 4 TIMES
C Forward 20
D Turn right 120
E END REPEAT
Line B — A triangle has 3 sides, so the pattern of forward and turn repeats 3 times. REPEAT 4 TIMES would draw too much. It should be REPEAT 3 TIMES.

Student with a class code? Join your class →