Assignment ← versus comparison =
← stores a value in a variable, so Score ← 5 saves 5 in Score. = only tests if two values are equal, as in IF Score = 5, and gives TRUE or FALSE. <> tests not equal.
Understanding Assignment ← versus comparison = in IGCSE Computer Science Paper 2
What it does: <> means not equal to. The condition is TRUE whenever Score holds any value other than 5. The arrow stores the new value on the left. Lives - 1 is worked out first, then the result is saved back in Lives. Writing = for assignment is an error in 0478 pseudocode. Use ← to store the new value. Assigning with = is a common exam error. The correct way to store 0 in Count is Count ← 0. <> is the pseudocode not-equal operator. It is used in conditions such as IF Answer <> 5 THEN. The error is using = for assignment. The correct statement is Score ← 5.
Common mistakes: Storing a value in a variable needs the assignment arrow, so it should be Score ← 0. A single = only tests whether two values are equal. An IF condition must test a value, so it needs = to compare. It should be IF Age = 18. The ← arrow would try to store 18 in Age.
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
Score ← 5Fill in the Blanks
Spot the Error
Student with a class code? Join your class →