AND, OR and NOT
Logic operators that combine or reverse conditions: AND needs both true, OR needs one true, NOT reverses a condition. Range test: Number >= 1 AND Number <= 10
Understanding AND, OR and NOT in IGCSE Computer Science Paper 2
What it does: OR is true when at least one condition is true, so either Sat or Sun makes the whole condition true. Both comparisons must be true together for Number to be inside the range 1 to 10, which is why AND joins them. 5 >= 1 is TRUE and 5 <= 10 is TRUE. Both are true, so AND gives TRUE. 15 >= 1 is TRUE but 15 <= 10 is FALSE. AND needs both true, so the result is FALSE. A range test uses AND. With OR, almost every number passes, for example 50 is >= 1 so it would be accepted.
Common mistakes: A range test needs both conditions to be true, so it must use AND. With OR, every number passes, because each number is either at least 1 or at most 10. It should be IF Num >= 1 AND Num <= 10. AND joins two complete conditions, and the second one has lost its variable. Each side needs its own comparison: IF Age >= 13 AND Age <= 19.
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 265–274) and word search (Modules 254–274).
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
AND, OR, NOTFill in the Blanks
Spot the Error
Student with a class code? Join your class →