Tracing a compound condition step by step
Work out each part as TRUE or FALSE for the current values, record both in the trace table, then combine them with AND, OR or NOT. Do brackets first.
Understanding Tracing a compound condition step by step in ACARA Digital Technologies Years 9–10
What it does: The columns show each part's result separately (count < 5 and lives > 0), then a final column for the combined result. The bracket (a > 2 AND b < 4) is traced first to get TRUE or FALSE, and only then does NOT reverse that result. OR is TRUE when at least one part is TRUE. hasTicket = TRUE is TRUE, so the whole condition is TRUE.
Common mistakes: 65 is greater than or equal to 50, so part A is TRUE, not FALSE. Each part must be worked out correctly before combining. The trace says NOT raining is TRUE, so raining must be FALSE. The values on line 1 should be temp=30, raining=FALSE.
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 492–534) and word search (Modules 459–534).
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
trace a compound conditionFill in the Blanks
Spot the Error
Student with a class code? Join your class →