Assignment with ← (7d)
The ← arrow stores the value on its right in the variable on its left. Total ← 0 sets Total to 0. A new assignment replaces the old value. It is not the same as = used to compare.
Understanding Assignment with ← (7d) in IGCSE Computer Science Paper 2
What it does: After the second line Score holds 8. The earlier value of 5 is lost because a new assignment replaces the old value. The value 10 on the right of the arrow goes into the variable Count on the left. The data always flows from right to left. Total + Number is 10 + 4 = 14. That result is stored back in Total, so Total is 14. ← is for assignment (storing a value). Comparing two values uses = in a condition such as IF Total = 0 THEN. Use = to compare and ← to assign. An IF condition needs a comparison, so it uses =.
Common mistakes: The arrow stores the value on its right in the variable on its left. A variable must be on the left, so this should be Number ← 5. The left side of ← must be a single variable that receives the value. The calculation goes on the right: Total ← Num1 + Num2.
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 254–264) 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
Total ← 0Fill in the Blanks
Spot the Error
Student with a class code? Join your class →