Relational operators
Relational operators compare two values and give a BOOLEAN result (TRUE or FALSE). = equal, <> not equal, < less than, <= less or equal, > greater than, >= greater or equal.
Understanding Relational operators in IGCSE Computer Science Paper 2
What it does: < is strictly less than, so the boundary value 40 is not included. Using <= would make 40 give TRUE. In a condition, = compares two values for equality and gives TRUE or FALSE. It does not assign a value. Cambridge pseudocode uses <> for not equal. The symbol != belongs to languages such as Python. The operator >= means greater than OR equal to. 16 is equal to 16, so the result is TRUE. A mark of exactly 40 must pass, so you need >=. Using > would wrongly fail a mark of 40. <> means not equal. X is equal to 7, so 'X is not equal to 7' is FALSE.
Common mistakes: => is not a relational operator in pseudocode. 'Greater than or equal to' is written >=, so the line should be IF Age >= 18 THEN. Pseudocode uses <> for 'not equal to', not !=. The line should be IF Guess <> 7 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 146–155) and word search (Modules 146–165).
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 →