Indenting THEN and ELSE by two spaces
THEN and ELSE sit two spaces in from IF, on their own lines. The statements inside each go further in, and ENDIF lines up with IF. Nested IFs keep the same two-space step.
Understanding Indenting THEN and ELSE by two spaces in IGCSE Computer Science Paper 2
What it does: THEN and ELSE have two spaces, the OUTPUT statements have four, and ENDIF starts in the same column as IF. THEN goes on its own line, indented two spaces in from IF, because it continues the IF statement.
Common mistakes: THEN is already on line 2, on its own line two spaces in. The statement inside it must go on its own line, indented further to four spaces: ' OUTPUT "Adult"'. THEN must not be written on the IF line. It goes on its own line, indented two spaces in from IF. Line 1 should be just 'IF Score >= 50'.
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 156–165) and word search (Modules 146–165).
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
THENFill in the Blanks
Spot the Error
Student with a class code? Join your class →