AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Programming concepts: REPEAT … Instructions here … UNTIL Solved
REPEAT … UNTIL is AQA pseudocode for indefinite (condition controlled) iteration with the condition at the end.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 15 of 23
Study notes
From the checked teaching notes for this specification point.
The idea
REPEAT … UNTIL is AQA pseudocode for indefinite (condition controlled) iteration with the condition at the end. The instructions between REPEAT and UNTIL form the loop body and run at least once. After the body, the condition following UNTIL is tested; if it is false the body repeats, and if it is true the loop ends. In the example, the loop keeps running until the variable Solved becomes true. Because the test is at the end, the body is guaranteed to execute at least once, unlike a WHILE loop. A common use is repeatedly reading input or processing steps until a success flag is set. Reading the structure from top to bottom shows the order: body first, then condition.
What earns the marks
- Recognises REPEAT … UNTIL as indefinite (condition controlled) iteration.
- States that the instructions in the body execute before the condition is tested.
- Explains that the loop repeats while the condition is false and terminates when it is true.
- Notes that the body runs at least once because the condition is at the end.
- Interprets UNTIL Solved as continuing until the variable Solved becomes true.
Common mistakes and how to put them right
Believing the condition is checked before the body runs.
Put it right: The body runs first, then UNTIL is tested.
Thinking the loop ends when Solved is false.
Put it right: It repeats until Solved is true.
Treating REPEAT … UNTIL as a fixed-count loop.
Put it right: It is indefinite, controlled by a condition.
Exam tips
- Trace the loop step by step: run the body, then evaluate the UNTIL condition.
- State clearly that the body executes at least once.
- Explain the difference between repeating while false and stopping when true.
Try the lesson
The start of the Programming concepts: REPEAT … Instructions here … UNTIL Solved lesson, made from checked teaching notes for this specification point.
Have a go first
A program uses a REPEAT … UNTIL loop with the condition UNTIL Solved. When is the loop's condition first tested?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Programming concepts: REPEAT … Instructions here … UNTIL Solved
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge