Error: wrong logical operator
Use OR, not AND, to catch an invalid mark. A mark cannot be below 0 and above 100 at once, so AND is never TRUE. OR is TRUE when either part is TRUE.
Understanding Error: wrong logical operator in IGCSE Computer Science Paper 2
What it does: 120 is above 100, but it is not below 0. AND needs both parts TRUE, so the condition is FALSE even though the mark is invalid. Only the logical operator is wrong. Replacing AND with OR means either out-of-range test can make the condition TRUE.
Common mistakes: A mark cannot be below 0 and above 100 at the same time, so AND is never TRUE and invalid marks are never caught. It should be IF Mark < 0 OR Mark > 100. AND needs both parts to be TRUE, which is impossible for one mark. A mark of 150 or -5 would slip through. Use OR so that either part being TRUE catches the invalid mark.
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 232–241) and word search (Modules 232–253).
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
Mark < 0 OR Mark > 100Fill in the Blanks
Spot the Error
Student with a class code? Join your class →