REPEAT ... UNTIL
A loop that runs its statements first, then tests the condition. It stops when the condition is TRUE, so the body always runs at least once. It has no ENDREPEAT keyword.
Understanding REPEAT ... UNTIL in IGCSE Computer Science Paper 2
What it does: Even though the condition is TRUE straight away, OUTPUT runs once before the test, showing the body always runs at least once. UNTIL with its condition closes the loop, so no ENDREPEAT is needed. The loop stops when Number > 0 is TRUE.
Common mistakes: A REPEAT loop must start with the keyword REPEAT. WHILE starts a different loop type that has no UNTIL at the end. Line 1 should be REPEAT. Pseudocode keywords must be written in upper case. Line 1 should be REPEAT, not repeat.
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 166–175) and word search (Modules 166–187).
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
REPEAT ... UNTILFill in the Blanks
Spot the Error
Student with a class code? Join your class →