Meaningful identifiers for variables and constants
A name that describes what a variable or constant holds, such as TotalToPay instead of T, so the program is easy to read and maintain.
Understanding Meaningful identifiers for variables and constants in IGCSE Computer Science Paper 2
What it does: Using i for an index is a widely understood convention, so a single letter is fine here. X and Y are standard names for coordinates, so they are meaningful in that context. TotalToPay describes what the variable holds, so the program is easier to read. A single letter like T tells you nothing. The computer does not care about the name. Meaningful names help people read, understand and update the code. The first line shows what each value means. The second line forces the reader to guess. Single letters are only fine where they are conventional, such as i and j for indexes or X and Y for coordinates. A bill total needs a descriptive name.
Common mistakes: X says nothing about what it holds. The variable declared to hold the final amount is TotalToPay, so the line should be TotalToPay ← HourlyRate * 8. A single letter X does not tell the reader this is the pay per hour. It should be HourlyRate ← 12.5, which also matches its use on line 3.
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 347–357) and word search (Modules 337–357).
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
meaningful identifierFill in the Blanks
Spot the Error
Student with a class code? Join your class →