Logical operator AND
AND joins two conditions and is TRUE only when both are TRUE, e.g. Age >= 13 AND Age <= 19. If either condition is FALSE, the whole condition is FALSE.
Understanding Logical operator AND in IGCSE Computer Science Paper 2
What it does: A range check needs a lower limit and an upper limit joined by AND so both must be satisfied. 15 > 10 is TRUE but 4 > 9 is FALSE, so the whole condition is FALSE and the THEN part is skipped. Both conditions are TRUE (15 >= 13 and 15 <= 19), so AND gives TRUE. Each side of AND must be a full condition, so Mark must be repeated on both sides. One FALSE condition is enough to make an AND condition FALSE. Z > X means 2 > 5, which is FALSE. With three conditions, all three must be TRUE for AND to give TRUE.
Common mistakes: The upper limit of the range should use <=. With Age>=19 the range check is wrong, so the correct condition is Age>=13 AND Age<=19. A range check needs AND so both conditions must be TRUE. With OR every number passes. It should be IF Num>=1 AND Num<=10 THEN.
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
ANDFill in the Blanks
Spot the Error
Student with a class code? Join your class →