Assignment with ← (7a)
The ← assignment operator stores the value on its right in the variable on its left. Here 0 is stored in Counter. The value must match the variable's data type.
Understanding Assignment with ← (7a) in IGCSE Computer Science Paper 2
What it does: Total is on the left so it receives the value 25 from the right of the arrow. Name is a STRING variable so it must be given a string value in double quotes, not a number. The identifier on the left is the variable that gets the value. 25 is the value being stored. The right side is worked out first using the old value of Counter. The result is then stored back in Counter. ← assigns, it does not compare. Cambridge pseudocode uses ← to assign a value. == is not used for assignment in pseudocode, and it is a comparison in some languages.
Common mistakes: The variable being assigned must be on the left of the ← and the value on the right. It should be Counter ← Counter + 1. The assignment is the wrong way round. The variable goes on the left and the value on the right, so it should be Counter ← 0.
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 27–36) and word search (Modules 27–46).
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 →