Logical operator OR
Joins two conditions. The result is TRUE when at least one condition is TRUE, e.g. Day = "Sat" OR Day = "Sun". It is only FALSE when both conditions are FALSE.
Understanding Logical operator OR in IGCSE Computer Science Paper 2
What it does: If Age is 30, both Age < 5 and Age > 65 are FALSE, so the OR is FALSE. If either one is TRUE, the whole condition is TRUE. Each side of OR must be a full condition. Write Day = "Sun", not just "Sun". One TRUE condition is enough for OR. Mark > 100 is TRUE, so the result is TRUE. This is how we spot values outside a range. No number can be below 1 and above 10 at the same time, so AND is never TRUE. OR catches values at either end. Day is "Wed", so Day = "Sat" is FALSE and Day = "Sun" is FALSE. With both FALSE, OR gives FALSE.
Common mistakes: Day cannot be both "Sat" and "Sun" at once, so AND is never TRUE. OR is needed: IF Day = "Sat" OR Day = "Sun". The conditions are the wrong way round. Every number is above 0 or below 100, so every mark would be invalid. It should be IF Mark < 0 OR Mark > 100.
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 358–368) and word search (Modules 358–378).
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
ORFill in the Blanks
Spot the Error
Student with a class code? Join your class →