Assignment with the ← operator
Assignment: the value on the right of the arrow is stored in the variable on the left. Counter ← 0 stores 0 in Counter and replaces any earlier value.
Understanding Assignment with the ← operator in IGCSE Computer Science Paper 2
What it does: The arrow points left towards Total, which is the variable receiving the value 25. In maths Counter = Counter + 1 makes no sense, but as an assignment the right side is worked out first and then stored back in Counter. ← is an action. It stores a value in a variable. It does not state that two things are equal, as = does in an equation. The new value replaces the earlier one. It is not added to it, so Counter holds only 7. The data always flows from right to left, into the variable on the left. Assigning to a variable again overwrites its old value, so only the latest value 15 is kept.
Common mistakes: The arrow must point to the variable receiving the value. A value cannot be stored in 0. It should be Counter ← 0. Cambridge pseudocode uses the ← operator for assignment. The = sign is for comparing values. It should be Score ← 10.
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 307–316) and word search (Modules 296–316).
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
Counter ← 0Fill in the Blanks
Spot the Error
Student with a class code? Join your class →