Setting up the variable columns of a trace table
To set up a trace table, give each variable its own column in the order they first appear, then add a row each time a value changes. Leave unchanged cells blank.
Understanding Setting up the variable columns of a trace table in IGCSE Computer Science Paper 2
What it does: The columns would be Num, Sum, Count, in the same order as the DECLARE statements. The assignment gives Sum a starting value, so 0 is written in the Sum column. Later rows only change when Sum changes. Using the order of first appearance makes the table easy to match against the code, line by line. The column headings are the variable names, not their data types. A blank cell shows the value is unchanged. Writing 0 would wrongly suggest Total was reset. Adding a row for each change lets you follow the algorithm step by step. Columns follow the order the variables first appear in the algorithm.
Common mistakes: Assignment uses ←, not =. In Cambridge pseudocode = is a comparison. Total ← 0 sets the starting value, which goes in the first row of the Total column. A FOR loop sets its counter with ←, so it should be FOR Count ← 1 TO 3. The loop counter Count gets its own column in the trace table, and its starting value 1 goes in the first row.
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 71–82) and word search (Modules 71–92).
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
one column per variableFill in the Blanks
Spot the Error
Student with a class code? Join your class →