← IGCSE Computer Science Paper 2

Identifiers in Pascal case (7c)

An identifier in Pascal case: a variable or constant name using only letters and digits, starting with a capital, with each word capitalised and no spaces or underscores.

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

What it does: AverageMark tells the reader exactly what the variable holds, which is better than a vague name like X. The exception to the capital letter rule is that i and j may be used as loop counters or array indices. Pascal case capitalises each word and uses no underscores. NumberOfPlayers is correct. A space is not a letter or digit, so Total Score is not allowed. Write TotalScore instead. An identifier cannot start with a digit. Player1 starts with a capital letter, so it is fine. Single letters such as i and j are allowed for array indices. x_1 breaks the rules because it has an underscore.

Common mistakes: Identifiers may only use letters and digits, so an underscore is not allowed. Pascal case capitalises each word instead: PlayerCount. An identifier cannot contain a space, so Final Mark is not one name. It should be written FinalMark, matching the declaration.

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 136–145) and word search (Modules 123–145).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which is a correctly written identifier in Pascal case?
NumberOfPlayersnumber_of_players
Matches
DECLARE Player_Score : INTEGER
↓
The name contains an underscore. Identifiers may only use letters and digits, so it should be PlayerScore.
Applying
Meanings
Term
NumberOfPlayers
Meaning
An identifier in Pascal case: a variable or constant name using only letters and digits, starting with a capital, with each word capitalised and no spaces or underscores.
Practice
DECLARE NumberOfPlayers : INTEGER
Testing
Gaps
← 4
Check Answer
Spots
1// Count the players
2DECLARE Player_Count : INTEGER

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

The 'Thorny Devil' badge — Detail Master, 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 is a correctly written identifier in Pascal case?
A. NumberOfPlayers ✓
B. number_of_players
Pascal case capitalises each word and uses no underscores. NumberOfPlayers is correct.
2. Which identifier follows the rule of using only letters and digits?
A. TotalScore2 ✓
B. Total Score
A space is not a letter or digit, so Total Score is not allowed. Write TotalScore instead.
3. Which identifier starts correctly?
A. 1Player
B. Player1 ✓
An identifier cannot start with a digit. Player1 starts with a capital letter, so it is fine.
4. Which identifier has a name that describes its purpose?
A. Thing
B. AverageMark ✓
A good identifier tells you what the value is used for. AverageMark does this, but Thing does not.
5. An array index loop uses a single letter. Which is allowed?
A. i ✓
B. x_1
Single letters such as i and j are allowed for array indices. x_1 breaks the rules because it has an underscore.

Match the Pairs

NumberOfPlayers → A correct Pascal case identifier: each word starts with a capital letter, with no spaces or underscores
Total2 → A valid identifier: it starts with a capital letter and uses only letters and digits
A name that describes its purpose, so the reader knows what the variable stores → DECLARE AverageMark : REAL
Single letters such as i and j are allowed as array indices → FOR i ← 1 TO 10
DECLARE Player_Score : INTEGER → The name contains an underscore. Identifiers may only use letters and digits, so it should be PlayerScore.
DECLARE 2ndPlace : INTEGER → The name starts with a digit. An identifier must start with a letter, for example SecondPlace.

Key Term

NumberOfPlayers
An identifier in Pascal case: a variable or constant name using only letters and digits, starting with a capital, with each word capitalised and no spaces or underscores.

Fill in the Blanks

1. DECLARE NumberOfPlayers : INTEGER NumberOfPlayers ← 4
Hint: Type the variable name declared on the first line, written exactly the same way in Pascal case.
2. DECLARE TotalScore : INTEGER TotalScore ← 0
Hint: Type the keyword that creates a variable before its name and data type.
3. DECLARE TotalScore : INTEGER TotalScore ← 0 OUTPUT TotalScore
Hint: Type the identifier being displayed, using the same Pascal case name as above.
4. FOR i ← 1 TO 10 OUTPUT Marks[i] NEXT i
Hint: Type the single-letter index variable that the loop uses for the array.
5. CONSTANT MaxScore ← 100 DECLARE Score : INTEGER IF Score > MaxScore THEN
Hint: Type the constant name from the first line, with each word starting with a capital letter.

Spot the Error

Question 1
A // Count the players
B DECLARE Player_Count : INTEGER
C PlayerCount ← 4
D OUTPUT PlayerCount
Line B — Identifiers may only use letters and digits, so an underscore is not allowed. Pascal case capitalises each word instead: PlayerCount.
Question 2
A DECLARE FinalMark : INTEGER
B DECLARE Mark : INTEGER
C INPUT Mark
D Final Mark ← Mark * 2
Line D — An identifier cannot contain a space, so Final Mark is not one name. It should be written FinalMark, matching the declaration.
Question 3
A CONSTANT PassMark ← 50
B DECLARE 1stMark : INTEGER
C INPUT FirstMark
D IF FirstMark >= PassMark THEN
E OUTPUT "Pass"
F ENDIF
Line B — An identifier cannot start with a digit. It must start with a capital letter, so use a name such as FirstMark.
Question 4
A DECLARE Price : REAL
B DECLARE TotalCost : REAL
C INPUT Price
D totalCost ← Price * 3
Line D — Pascal case starts with a capital letter. totalCost starts with a lower-case t, so it should be TotalCost, as declared.
Question 5
A DECLARE StudentCount : INTEGER
B INPUT StudentCount
C DECLARE A : REAL
D AverageMark ← 0
Line C — Identifiers should describe their purpose. A single letter like A says nothing, and only i and j are allowed as single letters (for array indices). Use AverageMark.

Student with a class code? Join your class →