A constant's value must be a literal
A constant must be set to a literal value, such as 6.50. It cannot be given a variable, another constant or an expression like Rate * 2.
Understanding A constant's value must be a literal in IGCSE Computer Science Paper 2
What it does: 100 is a literal number, so this is a correct constant declaration. "Oakfield" is a string literal, so it can be the value of a constant. A constant can only be set to a literal. Rate * 2 has to be calculated, so it is an expression. "Hello" is a STRING literal. UCASE(Word) is a function call using a variable, so it is not a literal. Variables, other constants and expressions must never be used as a constant's value.
Common mistakes: A constant's value must be a literal. Price * 0.2 uses a variable in an expression. It should be CONSTANT VatRate ← 0.2. Rate * 2 is an expression, so it cannot be a constant's value. Use a literal: CONSTANT Double ← 13.00.
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 317–326) and word search (Modules 317–336).
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 Rate ← 6.50Fill in the Blanks
Spot the Error
Student with a class code? Join your class →