Predicting the outcome of an algorithm
To trace an algorithm, pick starting values, follow each step in order, write down how the values change, and say what it shows at the end.
Understanding Predicting the outcome of an algorithm in ACARA Digital Technologies Years 5–6
What it does: Making a written prediction before running lets you check your tracing and spot mistakes. Using more than one input shows how branches and loops behave with different values. To predict an outcome, pick starting values first. Then follow each step in order to find the answer. Tracing means following every step in order. Writing the changes down helps you avoid mistakes. total starts at 2. After adding 5 it is 7. After adding 1 it is 8. So it shows 8. A tracking table has a row for each step. It shows what every variable holds as you go. 8 is not 10 or more, so the condition is false. The ELSE path runs and shows Free.
Common mistakes: = asks if two things are equal, so the total would never change when you trace it. To store a new value, use the assignment arrow: SET total ← total + 2. The loop does not say what to repeat, so you cannot trace how many times lives goes down. It should be REPEAT 3 TIMES.
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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
traceFill in the Blanks
Spot the Error
Student with a class code? Join your class →