Comparison operators
Comparison operators compare two values and give TRUE or FALSE. = equal, <> not equal, < less than, > greater than, <= less than or equal, >= greater than or equal.
Understanding Comparison operators in IGCSE Computer Science Paper 2
What it does: In a condition, = compares the two values. It does not store a value (that is the job of ←). Use > when a new value must be bigger than the current one, as when finding a maximum. If Mark equals Max, the result is FALSE. Cambridge 0478 pseudocode uses <> for not equal. != is used in languages like Python, but not in the Cambridge pseudocode. The >= operator means greater than or equal to. 50 is equal to 50, so the condition is TRUE. In Cambridge pseudocode a single = tests equality inside a condition. The double == is not part of the pseudocode.
Common mistakes: The operator for 'greater than or equal to' is >=, with > first then =. => is not a valid comparison operator. It should be IF Age >= 18 THEN. A score of 50 with a pass mark of 40 is a pass, so the test must be 'greater than or equal to'. <= is the wrong way round. It should be IF Score >= Pass 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 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
=, <>, <, >, <=, >=Fill in the Blanks
Spot the Error
Student with a class code? Join your class →