← IGCSE Computer Science Paper 2

Identifiers are case insensitive

Capital letters do not matter in identifiers, so Countdown and CountDown are the same name. Never use names that differ only in case as two separate variables.

Understanding Identifiers are case insensitive in IGCSE Computer Science Paper 2

What it does: The only difference between the two names is capital letters, and case does not matter for identifiers. HighScore and LowScore differ in whole words, so they are two separate variables and cannot be confused. Identifiers are case insensitive, so Score, SCORE and score all refer to the same variable. Mixed case is for readability only. FirstName and firstname are still the same identifier. Age and AGE are the same identifier. Use names that clearly differ in their letters, with one name meaning one thing. Capitals at the start of each word (PlayerName) help readability. They do not create a different name.

Common mistakes: TOTAL and Total are the same identifier because capital letters do not matter. This declares the same variable twice. Use a different name, such as Count. bonus on line 1 and Bonus on line 2 differ only in case, so they are the same name. Two variables cannot share one identifier. Line 1 should declare a different name, such as Lives.

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 307–316) and word search (Modules 296–316).

Take this worksheet further — free with Cloodit

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

Learning
Duo
In Cambridge pseudocode, are Score and SCORE the same identifier?
No, they are two different variables because the capital letters differYes, they are the same name because identifiers are case insensitive
Matches
DECLARE Countdown : INTEGER DECLARE CountDown : INTEGER
↓
The two names differ only in capital letters, so they are the same identifier and are declared twice.
Applying
Meanings
Term
case insensitive
Meaning
Capital letters do not matter in identifiers, so Countdown and CountDown are the same name. Never use names that differ only in case as two separate variables.
Practice
DECLARE PlayerScore : INTEGER
Testing
Gaps
DECLARE Countdown :
Check Answer
Spots
2Total ← 0
3DECLARE TOTAL : INTEGER

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

The 'Badger' badge — Determined Digger, 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. In Cambridge pseudocode, are Score and SCORE the same identifier?
A. No, they are two different variables because the capital letters differ
B. Yes, they are the same name because identifiers are case insensitive ✓
Identifiers are case insensitive, so Score, SCORE and score all refer to the same variable.
2. A student writes DECLARE Countdown : INTEGER and then DECLARE CountDown : INTEGER. What is wrong?
A. Nothing is wrong, because each name has a different capital D
B. The two names are the same identifier, so the variable is declared twice ✓
Countdown and CountDown differ only in capital letters, so they count as one name. They must not be used as two separate variables.
3. Which choice follows good practice for two different values, a player's total and a player's best score?
A. TotalScore and BestScore ✓
B. Score and SCORE
Choose names that differ in their letters, not only in their capitals. Score and SCORE would be the same name.
4. Why is mixed case such as FirstName useful in an identifier?
A. The capital letter shows where a new word starts, so the name is easier to read ✓
B. The capital letter makes it a different variable from firstname
Mixed case is for readability only. FirstName and firstname are still the same identifier.
5. A program uses Total ← 5 and later OUTPUT TOTAL. What is output?
A. 5, because TOTAL is the same variable as Total ✓
B. Nothing, because TOTAL is a different variable with no value
Identifiers are case insensitive, so TOTAL and Total refer to the same variable holding 5.

Match the Pairs

Score ← 10 score ← 20 → Both lines change the same variable, so Score now holds 20
DECLARE PlayerName : STRING → Mixed case marks where each new word starts, making the name easier to read
Identifiers are case insensitive, so these two names refer to the same variable → TotalMarks and totalmarks
Avoid near-duplicate names by giving each variable a clearly different name → DECLARE HighScore : INTEGER DECLARE LowScore : INTEGER
DECLARE Countdown : INTEGER DECLARE CountDown : INTEGER → The two names differ only in capital letters, so they are the same identifier and are declared twice.
Total ← 5 TOTAL ← Total + 1 OUTPUT total → Total, TOTAL and total look different but are one variable, which is confusing to read.

Key Term

case insensitive
Capital letters do not matter in identifiers, so Countdown and CountDown are the same name. Never use names that differ only in case as two separate variables.

Fill in the Blanks

1. DECLARE Countdown : INTEGER COUNTDOWN ← 10 OUTPUT countdown
Hint: Type the data type used for whole numbers. Notice that the three spellings of the name all refer to one variable.
2. DECLARE PlayerName : STRING PLAYERNAME ← "Sam" OUTPUT playername
Hint: Type the keyword that creates a new variable. Capital letters in the later names do not matter.
3. DECLARE Lives : INTEGER Lives ← 3 OUTPUT LIVES
Hint: Type the assignment operator that stores a value in the variable.
4. DECLARE HighScore : INTEGER HighScore ← 50 OUTPUT HIGHSCORE
Hint: Type the declared variable's name again, written entirely in capital letters. It is still the same variable.
5. DECLARE Age : INTEGER INPUT AGE OUTPUT age
Hint: Type the keyword that reads a value from the user into the variable.

Spot the Error

Question 1
A DECLARE Total : INTEGER
B Total ← 0
C DECLARE TOTAL : INTEGER
D OUTPUT Total
Line C — TOTAL and Total are the same identifier because capital letters do not matter. This declares the same variable twice. Use a different name, such as Count.
Question 2
A DECLARE bonus : INTEGER
B DECLARE Bonus : INTEGER
C Lives ← 3
Line A — bonus on line 1 and Bonus on line 2 differ only in case, so they are the same name. Two variables cannot share one identifier. Line 1 should declare a different name, such as Lives.
Question 3
A DECLARE Price : REAL
B CONSTANT TaxRate ← 0.2
C DECLARE TAXRATE : REAL
D Total ← Price * (1 + TaxRate)
Line C — TAXRATE is the same identifier as the constant TaxRate, because case is ignored. A name cannot be both a constant and a variable. Line 3 should declare a different name, such as Total.
Question 4
A DECLARE Speed : REAL
B DECLARE Time : REAL
C Speed ← 12.5
D DECLARE speed : REAL
E Distance ← Speed * Time
Line D — speed is the same identifier as Speed, which is already declared on line 1. Changing the capitals does not make a new variable. Line 4 should declare a new name, Distance.
Question 5
A DECLARE Total : INTEGER
B Total ← 0
C Total ← Total + 5
D // TOTAL is a different variable
Line D — The comment is wrong. Identifiers are case insensitive, so TOTAL and Total are the same variable, not different ones.

Student with a class code? Join your class →