OTHERWISE in a CASE statement (8.1b)
The last clause of a CASE statement. It runs when the variable matches none of the listed values, e.g. OTHERWISE : OUTPUT "Invalid choice". Without it, nothing happens if no value matches.
Understanding OTHERWISE in a CASE statement (8.1b) in IGCSE Computer Science Paper 2
What it does: The OTHERWISE clause comes after every listed value and directly before ENDCASE. This line is the catch-all that reports an invalid choice when no listed value matches. OTHERWISE comes last. It only runs when none of the values above it matched. OTHERWISE is followed by a colon and then the statement to run, just like the other CASE clauses. It does not use ELSE.
Common mistakes: Each CASE clause needs a colon between the value and the statement. It should be 1 : OUTPUT "Start". A CASE statement starts with CASE OF followed by the variable. OF is missing; it should be CASE OF Menu. Without it, the OTHERWISE clause has no valid CASE to belong to.
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 369–378) and word search (Modules 358–378).
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
OTHERWISEFill in the Blanks
Spot the Error
Student with a class code? Join your class →