Re-tracing a corrected algorithm
After a fix, trace the algorithm again with the same failing input, then other inputs, to check the output now matches what was expected.
Understanding Re-tracing a corrected algorithm in ACARA Digital Technologies Years 7–8
What it does: A new trace table is made for the corrected algorithm, using the same input that failed before, and each row is recorded again. A new trace table shows what the fixed steps really do. The old table records the buggy steps, so it can't be trusted. One input may only test one path through an IF or loop. Try other inputs so every path is checked. A fix can break something else. Re-tracing old inputs that used to work helps catch a new error. When the traced output doesn't match the expected output, there is still a bug. Look at the trace table for the row where it goes wrong.
Common mistakes: After a fix, a new trace table with the same input shows total is 6, so the output should be 6. OUTPUT total + 2 prints 8, so the output does not match what was expected. It should be OUTPUT total. The variable is read in as marks but the IF tests mark. When you re-trace with the same input, mark has no value. The first line should be INPUT mark.
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 420–481) and word search (Modules 420–519).
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
re-traceFill in the Blanks
Spot the Error
Student with a class code? Join your class →