Stepping through code and watching variables
Run the next line only, then pause again. Check the variable watch panel after each step to see which line first gives a wrong value.
Understanding Stepping through code and watching variables in VCE Applied Computing U1O2
What it does: Each time this line is stepped over, the watch panel should show total increase by price. If it does not, this line is the fault. The faulty line is the first one where a variable gets a value that is not what you expected.
Common mistakes: count should start at 0. When you step over this line, the watch panel shows count as 1 before any marks are processed. It ends at 4 and the average is wrong. The line should be count = 0. Stepping through shows lives going up (4, 5, 6...) instead of down, so the loop never ends. The line should be lives = lives - 1.
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 89–124) and word search (Modules 8–124).
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
step overFill in the Blanks
Spot the Error
Student with a class code? Join your class →