What a constant is
A named value set once before the program runs that never changes, unlike a variable. Example: CONSTANT Pi ← 3.142 or CONSTANT HourlyRate ← 12.50 are fixed while the program runs.
Understanding What a constant is in IGCSE Computer Science Paper 2
What it does: The value 100 is given at the moment the constant is created and is never reassigned. A constant uses the keyword CONSTANT followed by its name, the ← operator and a value. DECLARE is used for variables. A fixed pay rate stays the same for the whole run. A score changes as the program runs, so it needs a variable.
Common mistakes: HourlyRate is a constant, so its value cannot be changed while the program runs. This line should assign to the variable instead: Hours ← 8. A constant is given its value with the assignment arrow ←, not =. It should be CONSTANT Pi ← 3.142.
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
CONSTANTFill in the Blanks
Spot the Error
Student with a class code? Join your class →