Choosing test data for compound conditions
Values chosen so each part of a compound condition is TRUE and FALSE in turn, including boundaries like 17, 18 and 19 for Age >= 18, so every path gets tested.
Understanding Choosing test data for compound conditions in ACARA Digital Technologies Years 9–10
What it does: This is one of the four combinations for IF Age >= 18 AND HasTicket = TRUE. Age is TRUE and HasTicket is FALSE, so the AND is FALSE. The other three combinations also need test data. Count starts at 10, so Count < 5 is FALSE straight away. The loop body is skipped, which tests the zero-times path. Boundary testing uses the value just below, on, and just above the limit. 17, 18 and 19 show exactly where the condition changes from FALSE to TRUE. The case where both parts are FALSE is the only one where OR gives FALSE. Leaving it out means that path is never tested.
Common mistakes: Age 17 makes Age >= 18 FALSE, so the whole AND is FALSE even though Paid is YES. The expected result should be FALSE. The boundary test with Age 18 expects TRUE, but > 18 makes 18 FALSE. The condition should be Age >= 18.
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 536–590) and word search (Modules 536–622).
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
test dataFill in the Blanks
Spot the Error
Student with a class code? Join your class →