AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
An example of indefinite (condition controlled) iteration with the…
Full specification wording
Programming concepts: An example of indefinite (condition controlled) iteration with the condition at the start would be:
Indefinite iteration repeats a block an unknown number of times, stopping only when a condition changes.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 12 of 23
Study notes
From the checked teaching notes for this specification point.
The idea
Indefinite iteration repeats a block an unknown number of times, stopping only when a condition changes. When the condition sits at the start (a pre-condition or entry-controlled loop), the test is evaluated before the body runs, so the body may execute zero times. In pseudocode this is a WHILE loop: the condition is checked, and only if it is true does the indented body run, then control returns to the test. Contrast a REPEAT…UNTIL loop, where the body runs at least once because the condition is checked at the end. A concrete example: set a counter to 0, then WHILE counter < 5, add 1 to the counter and ENDWHILE — the loop stops once the counter reaches 5. Choosing the correct example means identifying that the condition is tested first and that the number of repetitions is not fixed in advance.
What earns the marks
- Identifies that indefinite (condition-controlled) iteration repeats until a condition is met, not a fixed number of times.
- Recognises that with the condition at the start, the condition is tested before the loop body executes.
- States that the body may therefore run zero times if the condition is false initially.
- Distinguishes a WHILE (pre-condition) loop from a REPEAT…UNTIL (post-condition) loop where the body runs at least once.
- Selects an example in which a condition is evaluated first and the loop exits when that condition becomes false.
Common mistakes and how to put them right
Assuming an entry-controlled loop always runs at least once.
Put it right: Because the test comes first, the body can be skipped entirely.
Confusing indefinite iteration with a FOR loop that repeats a fixed number of times.
Put it right: Indefinite loops depend on a condition, not a set count.
Placing the condition at the end (REPEAT…UNTIL) and calling it entry-controlled.
Put it right: That is post-condition, so the body runs before the test.
Exam tips
- Underline the words 'condition at the start' to remind yourself the test happens before the body.
- Trace a short example with a starting value that makes the condition false to show the body runs zero times.
- Compare directly with REPEAT…UNTIL so the difference in when the condition is checked is explicit.
Try the lesson
The start of the Programming concepts: An example of indefinite (condition controlled) iteration with the condition at the start would be: lesson, made from checked teaching notes for this specification point.
Have a go first
Which type of loop checks its condition before running the instructions, so the body might not run at all?
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: An example of indefinite (condition controlled) iteration with the condition at the start would be:
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