Testing compound conditions with and, or, not
A table listing every True/False combination of the parts in an and/or/not condition. Use it to pick test inputs that make each part True and False, then check each result.
Understanding Testing compound conditions with and, or, not in ACARA Digital Technologies Years 9–10
What it does: This expression is one row of the and truth table, and its result is False because and needs both parts True. Each part can be True or False, so 2 x 2 = 4 combinations. Testing only 2 would miss cases. not True is False, so False and True gives False. An and versus or error is found by testing a value outside the range, which should be rejected but is accepted. Boundary tests on each part of a range condition show whether the comparison operators include the limits.
Common mistakes: A truth table needs each part to be True and False in turn. [True, True] never tests a as False, so half the rows are missing. It should be [True, False]. The beach needs both parts True, so the condition must use and. With or, sunny True and warm False wrongly gives True. It should be if sunny and warm:.
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
truth tableFill in the Blanks
Spot the Error
Student with a class code? Join your class →