CONSTANT declarations
Names a fixed literal value that never changes while the program runs. It makes code easier to read, and you update the value in one place only.
Understanding CONSTANT declarations in IGCSE Computer Science Paper 2
What it does: 3.14 is a literal value, so it is allowed. A constant cannot be set from a calculation or from user INPUT. Changing 6.50 to 7.00 on this one line updates every place in the program that uses HourlyRate. This is what makes it a constant. Variables are the named values that can change. MaxScore tells the reader what 100 means. If the maximum changes, you edit this one line only. It should be CONSTANT HourlyRate ← 6.50. Do any calculation later, in a separate statement.
Common mistakes: Pay is hours worked multiplied by the hourly rate. The line should use * (OUTPUT Hours * HourlyRate), not +. A constant cannot be changed once it is declared. Assigning a new value to MaxScore is wrong. The line should only use MaxScore, for example in an OUTPUT.
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
CONSTANT HourlyRate ← 6.50Fill in the Blanks
Spot the Error
Student with a class code? Join your class →