AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Use definite (count controlled) and indefinite (condition controlled)…
Full specification wording
Programming concepts: Use definite (count controlled) and indefinite (condition controlled) iteration, including indefinite iteration with the condition(s) at the start or the end of the iterative structure.
Iteration repeats a block of code.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 9 of 23
Study notes
From the checked teaching notes for this specification point.
The idea
Iteration repeats a block of code. Definite (count-controlled) iteration repeats a known number of times, usually with a counter that is initialised, tested and incremented, as in a FOR loop running from 1 to 10. Indefinite (condition-controlled) iteration repeats until a condition changes, so the number of repetitions is not fixed in advance. The condition can be tested at the start of the structure (a while loop: test first, so the body may run zero times) or at the end (a do-until or repeat-until loop: body runs at least once, then the condition is tested). Choosing the right form depends on whether the count is known and whether the body must run at least once.
What earns the marks
- Definite iteration repeats a known, predetermined number of times, typically controlled by a counter.
- Indefinite iteration repeats while or until a condition holds, so the number of repetitions is not fixed in advance.
- A condition at the start (while loop) is tested before the body, so the body may execute zero times.
- A condition at the end (do-until/repeat-until) is tested after the body, so the body executes at least once.
- Selecting the correct loop type for a scenario: known count uses definite iteration; unknown count or must-run-once uses indefinite iteration.
Common mistakes and how to put them right
Assuming a while loop always runs at least once.
Put it right: Is that a start-tested condition can be false immediately, so the body runs zero times.
Confusing count-controlled and condition-controlled loops.
Put it right: Is that definite iteration uses a counter with a known number of repetitions, while indefinite iteration depends on a condition.
Forgetting that an end-tested loop runs the body before checking the condition.
Put it right: Is that the body executes at least once even if the condition is initially false.
Exam tips
- Identify whether the number of repetitions is known before choosing a loop type.
- Trace a short loop by hand, writing the value of the counter or condition after each pass.
- For end-tested loops, state explicitly that the body runs at least once.
Try the lesson
The start of the Programming concepts: Use definite (count controlled) and indefinite (condition controlled) iteration, including indefinite iteration with the condition(s) at the start or the end of the iterative structure. lesson, made from checked teaching notes for this specification point.
Have a go first
A programmer writes a loop that repeats exactly 12 times because a counter is compared with 12. Which type of iteration is this?
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: Use definite (count controlled) and indefinite (condition controlled) iteration, including indefinite iteration with the condition(s) at the start or the end of the iterative structure.
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