What a variable is
A named storage location in memory whose value can change while a program runs, such as Score going from 0 to 10. Programs use it to remember values.
Understanding What a variable is in IGCSE Computer Science Paper 2
What it does: DECLARE creates the name Score for a memory location that will hold an INTEGER. The stored value is replaced by a new one, so the variable remembers an updated score. A variable's value can change as the program runs. A storage location whose value is fixed is a constant. A variable holds one value at a time. Assigning 10 replaces the old value of 0. Variables use memory to store values the program needs later, such as scores, names or totals. The new assignment replaces the old value, so Lives is now 2. The student thinks the first value is kept, but assigning a new value overwrites the old one.
Common mistakes: The variable name must be on the left of ←, because the value is stored into the variable. A number cannot be a storage location. It should be Score ← 10. A new value is stored in a variable with the assignment arrow ←, not =. It should be Lives ← Lives - 1, which replaces 3 with 2.
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
variableFill in the Blanks
Spot the Error
Student with a class code? Join your class →