← IGCSE Computer Science Paper 2

Identifiers in Pascal case (7a)

An identifier: a variable name in Pascal case. Capital letter starts each word, letters and digits only, no spaces or underscores, can't start with a digit. Not case sensitive.

Understanding Identifiers in Pascal case (7a) in IGCSE Computer Science Paper 2

What it does: TotalScore joins two words with no space or underscore, using a capital at the start of each word. Cambridge pseudocode ignores upper and lower case in identifiers, so both spellings are one variable. An identifier must not start with a digit. Digits are fine after the first letter, as in Place1. Meaningful names make the algorithm easier to read and understand. X tells you nothing about the data. Underscores are not used in Pascal case. Only letters and digits are allowed. Pascal case capitalises the first letter of every word so the words are easy to see: HighestMark.

Common mistakes: Identifiers must not contain underscores. In Pascal case the words are joined and each starts with a capital letter, so it should be HighScore. An identifier cannot contain a space. 'Total Marks' would be read as two separate names. It should be TotalMarks.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 17–26) and word search (Modules 1–26).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which identifier follows Cambridge Pascal case?
number_of_playersNumberOfPlayers
Matches
DECLARE 2ndPlayer : STRING
↓
The identifier starts with a digit. It must start with a letter, for example SecondPlayer.
Applying
Meanings
Term
NumberOfPlayers
Meaning
An identifier: a variable name in Pascal case. Capital letter starts each word, letters and digits only, no spaces or underscores, can't start with a digit. Not case sensitive.
Practice
DECLARE NumberOfPlayers : INTEGER
Testing
Gaps
DECLARE : INTEGER
Check Answer
Spots
2DECLARE PlayerScore : INTEGER
3DECLARE High_Score : INTEGER

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Golden Eagle' badge — High Flyer, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which identifier follows Cambridge Pascal case?
A. number_of_players
B. NumberOfPlayers ✓
Pascal case starts each word with a capital letter and uses no underscores.
2. Which identifier is written correctly?
A. TotalScore ✓
B. Total Score
Identifiers cannot contain spaces. Join the words and start each with a capital letter.
3. Which identifier is NOT allowed?
A. Place1
B. 1stPlace ✓
An identifier must not start with a digit. Digits are fine after the first letter, as in Place1.
4. Which identifier is the better, more meaningful name for storing a student's age?
A. StudentAge ✓
B. X
Meaningful names make the algorithm easier to read and understand. X tells you nothing about the data.
5. In Cambridge pseudocode, Countdown and CountDown refer to...
A. The same variable ✓
B. Two different variables
Identifiers are case insensitive, so only the letters matter, not their capitalisation. Avoid using both, as it is confusing.

Match the Pairs

NumberOfPlayers → A good identifier in Pascal case: a capital letter starts each word and there are no spaces or underscores
Score2 → A valid identifier that uses a digit, which is allowed because it does not come first
An identifier must not contain spaces or underscores, so each word is joined and starts with a capital letter → TotalScore
Identifiers are not case sensitive, so these two names refer to the same variable → Countdown and CountDown
DECLARE 2ndPlayer : STRING → The identifier starts with a digit. It must start with a letter, for example SecondPlayer.
DECLARE number_of_players : INTEGER → The identifier uses underscores and no capital letters. Pascal case would be NumberOfPlayers.

Key Term

NumberOfPlayers
An identifier: a variable name in Pascal case. Capital letter starts each word, letters and digits only, no spaces or underscores, can't start with a digit. Not case sensitive.

Fill in the Blanks

1. // Stores how many people are playing DECLARE NumberOfPlayers : INTEGER
Hint: Type a meaningful Pascal case identifier for the value described in the comment: capital letter at the start of each word, no spaces or underscores.
2. DECLARE Score : INTEGER Score ← 0 Score ← Score + 1
Hint: Type the variable name that was declared on the first line, to add 1 to the same variable.
3. DECLARE HighScore : INTEGER
Hint: Type the keyword that creates a new variable with an identifier and a data type.
4. DECLARE FirstName : STRING OUTPUT "Enter your first name" INPUT FirstName
Hint: Type the identifier of the variable that will store the value the user enters.
5. // Is the game finished? DECLARE GameOver : BOOLEAN
Hint: Type the data type keyword for a variable that can only hold TRUE or FALSE.

Spot the Error

Question 1
A DECLARE PlayerName : STRING
B DECLARE PlayerScore : INTEGER
C DECLARE High_Score : INTEGER
D OUTPUT PlayerName
Line C — Identifiers must not contain underscores. In Pascal case the words are joined and each starts with a capital letter, so it should be HighScore.
Question 2
A DECLARE TotalMarks : INTEGER
B TotalMarks ← 0
C Total Marks ← TotalMarks + 5
D OUTPUT TotalMarks
Line C — An identifier cannot contain a space. 'Total Marks' would be read as two separate names. It should be TotalMarks.
Question 3
A DECLARE FirstScore : INTEGER
B DECLARE 2ndScore : INTEGER
C INPUT FirstScore
D INPUT SecondScore
Line B — An identifier cannot start with a digit. Spell the number as a word, for example SecondScore.
Question 4
A DECLARE PlayerAge : INTEGER
B DECLARE favColour : STRING
C INPUT PlayerAge
D INPUT FavColour
Line B — Pascal case starts every word with a capital letter, including the first. It should be FavColour, not favColour.
Question 5
A DECLARE Price : REAL
B DECLARE Quantity : INTEGER
C DECLARE x : REAL
D TotalCost ← Price * Quantity
Line C — Identifiers should be meaningful. The single letter x does not say what the variable stores. It should be TotalCost, which matches the calculation on the next line.

Student with a class code? Join your class →