← IGCSE Computer Science Paper 2

Keywords in capital letters

A Cambridge pseudocode keyword. All keywords, such as IF, THEN, FOR, NEXT and OUTPUT, are written in capital letters, and they cannot be used as identifier names.

Understanding Keywords in capital letters in IGCSE Computer Science Paper 2

What it does: IF, THEN, OUTPUT and ENDIF are all keywords written in capitals, and ENDIF closes the IF. FOR and TO are keywords, so both must be in capital letters. Cambridge pseudocode expects every keyword in capitals, for example OUTPUT, INPUT, IF and NEXT. ENDIF is a keyword, so it is written in capital letters to close an IF structure. IF is a keyword, so it cannot be used as an identifier name. TotalScore is a valid name. OUTPUT is a keyword and must be written in upper case. Cambridge pseudocode writes keywords such as IF and THEN in upper case. The identifier Score is in Pascal case.

Common mistakes: OUTPUT is a Cambridge pseudocode keyword, so it must be written in capital letters. The line should be OUTPUT "Pass". NEXT closes a FOR loop and is a keyword, so it must be in capital letters. The line should be NEXT Count.

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 line is written correctly in Cambridge pseudocode?
IF Score > 50 THENif Score > 50 then
Matches
if Score > 50 then
↓
The keywords if and then are in lower case. They must be IF and THEN.
Applying
Meanings
Term
IF
Meaning
A Cambridge pseudocode keyword. All keywords, such as IF, THEN, FOR, NEXT and OUTPUT, are written in capital letters, and they cannot be used as identifier names.
Practice
FOR Count ← 1 TO 5
Testing
Gaps
Check Answer
Spots
2IF Score >= 50 THEN
3 output "Pass"

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

The 'Meerkat' badge — Communicator, 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 line is written correctly in Cambridge pseudocode?
A. IF Score > 50 THEN ✓
B. if Score > 50 then
Cambridge pseudocode keywords such as IF and THEN are always written in capital letters.
2. Which loop header uses keywords correctly?
A. for Count ← 1 to 10
B. FOR Count ← 1 TO 10 ✓
FOR and TO are keywords, so both must be in capital letters.
3. Which statement about keywords is true?
A. Keywords can be written in any mix of upper and lower case
B. Keywords such as OUTPUT are written in upper case ✓
Cambridge pseudocode expects every keyword in capitals, for example OUTPUT, INPUT, IF and NEXT.
4. Which statement correctly ends an IF structure?
A. ENDIF ✓
B. endif
ENDIF is a keyword, so it is written in capital letters to close an IF structure.
5. Which identifier name is allowed?
A. TotalScore ✓
B. IF
IF is a keyword, so it cannot be used as an identifier name. TotalScore is a valid name.

Match the Pairs

IF Score > 50 THEN → IF and THEN are keywords, so they are written in capital letters
FOR Count ← 1 TO 10 → FOR and TO are keywords in capitals, and the loop is closed later by NEXT
An IF statement must be closed with its keyword ENDIF in capital letters → IF Age >= 16 THEN OUTPUT "Allowed" ENDIF
A FOR loop is closed with the keyword NEXT in capital letters → FOR Count ← 1 TO 5 OUTPUT Count NEXT Count
if Score > 50 then → The keywords if and then are in lower case. They must be IF and THEN.
DECLARE NEXT : INTEGER → NEXT is a keyword, so it cannot be used as an identifier name. Use a name such as NextNumber.

Key Term

IF
A Cambridge pseudocode keyword. All keywords, such as IF, THEN, FOR, NEXT and OUTPUT, are written in capital letters, and they cannot be used as identifier names.

Fill in the Blanks

1. IF Score >= 50 THEN OUTPUT "Pass" ENDIF
Hint: Type the capitalised keyword that closes an IF statement.
2. FOR Count ← 1 TO 5 OUTPUT Count NEXT Count
Hint: Type the capitalised keyword that marks the end of a FOR loop.
3. IF Age >= 16 THEN OUTPUT "Allowed" ENDIF
Hint: Type the capitalised keyword that follows the condition in an IF statement.
4. FOR Index ← 1 TO 10 OUTPUT Index * 2 NEXT Index
Hint: Type the capitalised keyword that starts a count-controlled loop.
5. INPUT Guess IF Guess = 7 THEN OUTPUT "Correct"
Hint: Type the capitalised keyword that reads a value from the user into a variable.

Spot the Error

Question 1
A INPUT Score
B IF Score >= 50 THEN
C output "Pass"
D ENDIF
Line C — OUTPUT is a Cambridge pseudocode keyword, so it must be written in capital letters. The line should be OUTPUT "Pass".
Question 2
A Total ← 0
B FOR Count ← 1 TO 5
C Total ← Total + Count
D next Count
Line D — NEXT closes a FOR loop and is a keyword, so it must be in capital letters. The line should be NEXT Count.
Question 3
A DECLARE Name : STRING
B DECLARE Age : INTEGER
C DECLARE NEXT : INTEGER
D Total ← 0
Line C — NEXT is a keyword, so it cannot be used as an identifier name. Use a name such as Total instead.
Question 4
A INPUT Mark
B if Mark > 90 THEN
C OUTPUT "Top grade"
D ENDIF
Line B — IF is a keyword and must be written in capital letters. The line should be IF Mark > 90 THEN.
Question 5
A Total ← 0
B FOR Num ← 1 to 3
C OUTPUT Num
D NEXT Num
Line B — TO is a keyword in a FOR loop and must be in capital letters. The line should be FOR Num ← 1 TO 3.

Student with a class code? Join your class →