← ACARA Digital Technologies Years 5–6

Deciding between a decision and a repeat

Use IF when a step happens only sometimes. Use REPEAT when the same steps happen many times. Use both together when a loop needs a choice inside.

Understanding Deciding between a decision and a repeat in ACARA Digital Technologies Years 5–6

What it does: The raincoat step depends on a condition, so IF ... THEN is the right choice. REPEAT handles the 7 days and the IF inside decides on each day whether the raincoat is needed. The umbrella step happens only sometimes, so use IF. It does not need to happen again and again. The same step happens many times, so use REPEAT. This saves you from writing the step 20 times. Stirring keeps happening until the soup is thick, so it is a repeat. Wearing a hat depends on one yes or no check, so it is an IF. The REPEAT goes through every coin. The IF inside chooses which coins give points. Using both together is common in algorithms.

Common mistakes: Adding a star is the same step done many times, so it needs REPEAT 10 TIMES. IF is only for a step that happens sometimes. You only take an umbrella sometimes, when it is raining. That is a decision, so the line should be IF weather = rain THEN.

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 120–132) 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
You only take an umbrella if it is raining. Which do you use?
IF (a decision)REPEAT (a loop)
Matches
IF it is raining THEN take umbrella take umbrella take umbrella
↓
The same step is written out again and again. A REPEAT 3 TIMES would do this job with one step.
Applying
Meanings
Term
IF or REPEAT
Meaning
Use IF when a step happens only sometimes. Use REPEAT when the same steps happen many times. Use both together when a loop needs a choice inside.
Practice
REPEAT 5 times
Testing
Gaps
it is raining THEN
Check Answer
Spots
2SAY Drawing stars
3IF 10 TIMES

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

The 'Armadillo' badge — Shield Bearer, 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. You only take an umbrella if it is raining. Which do you use?
A. REPEAT (a loop)
B. IF (a decision) ✓
The umbrella step happens only sometimes, so use IF. It does not need to happen again and again.
2. You need to write 'Wash one plate' for all 20 plates in the sink. Which fits best?
A. REPEAT 20 times ✓
B. IF there is a plate
The same step happens many times, so use REPEAT. This saves you from writing the step 20 times.
3. Which step should go inside an IF?
A. Put on a jacket only if it is cold ✓
B. Clap your hands 10 times
Putting on a jacket happens only sometimes, when a condition is true. Clapping 10 times is the same step done again and again, so it needs a REPEAT.
4. Which algorithm needs a REPEAT?
A. Stir the soup until it is thick ✓
B. Wear a hat if it is sunny
Stirring keeps happening until the soup is thick, so it is a repeat. Wearing a hat depends on one yes or no check, so it is an IF.
5. A game checks every coin on the screen. If a coin is gold, it adds 5 points. What does it need?
A. Only an IF and no REPEAT
B. Both: a REPEAT with an IF inside ✓
The REPEAT goes through every coin. The IF inside chooses which coins give points. Using both together is common in algorithms.

Match the Pairs

IF it is raining THEN take an umbrella → A decision: the step happens only sometimes, when it is raining.
REPEAT 5 TIMES: jump → A repeat: the same step happens many times, here 5 jumps.
Use a decision when a step only happens sometimes, like packing a raincoat only if it is raining → IF raining THEN pack raincoat
Use both together when a loop needs a choice inside, like checking every day of the week for rain → REPEAT 7 TIMES: IF raining THEN pack raincoat
IF it is raining THEN take umbrella take umbrella take umbrella → The same step is written out again and again. A REPEAT 3 TIMES would do this job with one step.
REPEAT 10 TIMES: clap → This claps 10 times, but the clapping was meant to happen only sometimes, such as only if the song is playing. It needs an IF.

Key Term

IF or REPEAT
Use IF when a step happens only sometimes. Use REPEAT when the same steps happen many times. Use both together when a loop needs a choice inside.

Fill in the Blanks

1. IF it is raining THEN take an umbrella
Hint: Type the keyword for a step that happens only sometimes.
2. REPEAT 10 TIMES do a star jump
Hint: Type the keyword for doing the same step many times.
3. REPEAT 5 TIMES IF the ball is red THEN put it in the red box
Hint: Type the keyword for a choice made inside the loop.
4. REPEAT UNTIL the bowl is full pour in more water
Hint: Type the word that keeps a loop going until a condition is true.
5. REPEAT UNTIL the bin is empty IF the item is plastic THEN put it in recycling
Hint: Type the keyword that makes the same steps go round many times.

Spot the Error

Question 1
A SET stars TO 0
B SAY Drawing stars
C IF 10 TIMES
D ADD 1 TO stars
E END REPEAT
Line C — Adding a star is the same step done many times, so it needs REPEAT 10 TIMES. IF is only for a step that happens sometimes.
Question 2
A ASK is it raining
B SET weather TO answer
C REPEAT UNTIL weather = rain
D TAKE umbrella
E END IF
Line C — You only take an umbrella sometimes, when it is raining. That is a decision, so the line should be IF weather = rain THEN.
Question 3
A SET plates TO 8
B IF plates = 8 THEN
C WASH plate
D END REPEAT
Line B — Washing a plate is the same step done many times, so it needs REPEAT 8 TIMES. An IF would only wash plates once, and only if there are 8.
Question 4
A SET wet TO 0
B REPEAT 7 TIMES
C CHECK the sky
D REPEAT raining THEN
E ADD 1 TO wet
F END IF
Line D — Adding to wet should happen only on some days, when it is raining. That needs a decision, so the line should be IF raining THEN.
Question 5
A SET pages TO 0
B REPEAT UNTIL pages = 20
C READ a page
D SET pages TO 1
E END REPEAT
Line D — Setting pages to 1 inside the loop resets the count every time, so pages never reaches 20 and the loop never stops. It should be ADD 1 TO pages.

Student with a class code? Join your class →