← IGCSE Computer Science Paper 2

Error: = used instead of ←

Use ← to store a value, so write Total ← 0, not Total = 0. Use = only to compare, as in IF Score = 5, not IF Score ← 5. Swapping them is an error.

Understanding Error: = used instead of ← in IGCSE Computer Science Paper 2

What it does: Assignment uses ←, so this line stores 5 in Score. A condition compares values, so it uses = and not ←. ← assigns (stores) a value in a variable. Writing Total = 0 uses the comparison symbol, which is an error. In IGCSE pseudocode, ← assigns and = compares. Count = 0 does not store anything, so the correction is Count ← 0. The result must be stored in Total with ←. Using = would only compare Total with Total + Mark. Use ← to assign. Pseudocode does not use == at all; it uses = only to compare. Using = on its own line is an error, because assignment must use the ← arrow.

Common mistakes: = compares values, it does not store them. To store 0 in Total, use the assignment arrow: Total ← 0. An IF condition compares values, so it needs =. ← is for assignment. The line should be IF Score = 5.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 232–241) and word search (Modules 232–253).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which line correctly stores the value 0 in the variable Total?
Total ← 0Total = 0
Matches
Count = Count + 1
↓
= is used to assign, but = only compares. The fix is Count ← Count + 1.
Applying
Meanings
Term
Total ← 0
Meaning
Use ← to store a value, so write Total ← 0, not Total = 0. Use = only to compare, as in IF Score = 5, not IF Score ← 5. Swapping them is an error.
Practice
DECLARE Total : INTEGER
Testing
Gaps
Total 0
Check Answer
Spots
1DECLARE Total : INTEGER
2Total = 0

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Lion's Mane Jellyfish' badge — Set Operator, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which line correctly stores the value 0 in the variable Total?
A. Total = 0
B. Total ← 0 ✓
← assigns (stores) a value in a variable. Writing Total = 0 uses the comparison symbol, which is an error.
2. Which condition correctly checks whether Score is equal to 5?
A. IF Score = 5 THEN ✓
B. IF Score ← 5 THEN
= compares two values in a condition. ← would try to store 5 in Score, so it is an error inside an IF.
3. A student writes Count = 0 at the start of an algorithm to set a counter. What is the error?
A. = compares, so they should have used Count ← 0 to assign ✓
B. ← compares, so they should have used Count = 0 to assign
In IGCSE pseudocode, ← assigns and = compares. Count = 0 does not store anything, so the correction is Count ← 0.
4. Which line is correct for storing the result of an addition?
A. Total ← Total + Mark ✓
B. Total = Total + Mark
The result must be stored in Total with ←. Using = would only compare Total with Total + Mark.
5. Which statement about the symbols is true?
A. = stores a value and ← compares two values
B. ← stores a value and = compares two values ✓
Remember: the arrow points to the variable that receives the value, so ← assigns. = asks whether two values are equal.

Match the Pairs

Total = 0 → Wrong: = compares, so this does not store 0 in Total. It should be Total ← 0.
Total ← 0 → Correct: stores the value 0 in the variable Total.
Use ← to store a value in a variable → Score ← 5
Use = to compare a variable with a value in a condition → IF Score = 5 THEN
Count = Count + 1 → = is used to assign, but = only compares. The fix is Count ← Count + 1.
IF Score ← 5 THEN → ← is used to compare, but ← only assigns. The fix is IF Score = 5 THEN.

Key Term

Total ← 0
Use ← to store a value, so write Total ← 0, not Total = 0. Use = only to compare, as in IF Score = 5, not IF Score ← 5. Swapping them is an error.

Fill in the Blanks

1. Total ← 0
Hint: Type the symbol that assigns (stores) a value in a variable.
2. IF Score = 5 THEN OUTPUT "Full marks" ENDIF
Hint: Type the operator that compares Score with a value in a condition.
3. Price ← 10 Total ← Price * 2 OUTPUT Total
Hint: Type the symbol that stores the result of the calculation in Total.
4. DECLARE Total : INTEGER Total ← 0 OUTPUT Total
Hint: Type the symbol that gives Total its starting value.
5. IF Answer = "Y" THEN Score ← Score + 1 ENDIF
Hint: Type the operator that checks if Answer matches a value, not one that stores it.

Spot the Error

Question 1
A DECLARE Total : INTEGER
B Total = 0
C OUTPUT Total
Line B — = compares values, it does not store them. To store 0 in Total, use the assignment arrow: Total ← 0.
Question 2
A DECLARE Score : INTEGER
B INPUT Score
C IF Score ← 5
D THEN
E OUTPUT "Full marks"
F ENDIF
Line C — An IF condition compares values, so it needs =. ← is for assignment. The line should be IF Score = 5.
Question 3
A DECLARE Count : INTEGER
B Count ← 0
C Count = Count + 1
D OUTPUT Count
Line C — This line should store a new value in Count, so it needs ←, not =. Write Count ← Count + 1.
Question 4
A DECLARE Price : REAL
B Price = 4.5
C OUTPUT Price
Line B — = compares and does not store a value. Use the assignment arrow to give Price its value: Price ← 4.5.
Question 5
A Total ← 0
B FOR Count ← 1 TO 5
C INPUT Mark
D Total = Total + Mark
E NEXT Count
Line D — Adding Mark to the running total must be stored in Total, so it needs ←. Write Total ← Total + Mark.

Student with a class code? Join your class →