Range check
A range check tests that a value lies between the lowest and highest allowed values. The limits themselves are accepted. AND joins both limits.
Understanding Range check in IGCSE Computer Science Paper 2
What it does: Dates can be range checked by testing their parts. Using >= and <= means the limits 1 and 12 are accepted. A value is in range only when it is at least the lowest value AND at most the highest value. AND means both limits must be met. With OR, every number passes because it is always at least 0 or at most 120, so the check would never reject anything. The limits themselves are valid. <= and >= include the limit value, so 0 and 100 both pass. A range check tests the size of the value, not just that it is a number. 150 is greater than 120, so it fails.
Common mistakes: A range check needs AND so the value must meet both limits. With OR, every number passes, even -5 or 500. It should be IF Age >= 0 AND Age <= 120. The THEN branch runs when the mark is inside the range, so it should output "Accepted". Here, valid marks would be rejected.
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 47–57) and word search (Modules 47–70).
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
IF Age >= 0 AND Age <= 120Fill in the Blanks
Spot the Error
Student with a class code? Join your class →