AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    A theoretical understanding of condition(s) at either end of an iterative…

    Full specification wording

    Programming concepts: A theoretical understanding of condition(s) at either end of an iterative structure is required, regardless of whether they are supported by the language(s) being used.

    You must understand, in theory, how a condition placed at the start or the end of an iterative structure behaves, even if the programming language you use does not provide both forms.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 10 of 23

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    You must understand, in theory, how a condition placed at the start or the end of an iterative structure behaves, even if the programming language you use does not provide both forms. A start-tested loop checks its condition before each pass, so the body may never run. An end-tested loop runs the body first and checks afterwards, so the body always runs at least once. This is conceptual knowledge about control flow, not a demand that your language supports every loop type.

    For example: If your language only offers a while loop, you can still describe and reason about an end-tested loop and predict its behaviour, and you can emulate one using a while loop with a flag.

    What earns the marks

    • The condition at the start of a loop is evaluated before the body, so the body may execute zero times.
    • The condition at the end of a loop is evaluated after the body, so the body executes at least once.
    • Theoretical understanding is required independently of whether a particular language supports both loop forms.
    • Predicting loop behaviour: given initial values, state how many times the body runs for start-tested versus end-tested conditions.
    • Emulating an end-tested loop in a language that lacks one, for example using a while loop with a Boolean flag.

    Common mistakes and how to put them right

    • Thinking the two forms behave identically.

      Put it right: Is that start-tested loops may run zero times while end-tested loops run at least once.

    • Assuming an end-tested loop checks its condition before the first pass.

      Put it right: Is that the body runs first and the condition is checked afterwards.

    Exam tips

    • State clearly whether the condition is checked before or after the body when comparing loop forms.
    • Use a trace table with initial values to show how many times each loop body runs.
    • When a language lacks a loop form, describe how it could be emulated rather than claiming it is impossible.

    Try the lesson

    The start of the Programming concepts: A theoretical understanding of condition(s) at either end of an iterative structure is required, regardless of whether they are supported by the language(s) being used. lesson, made from checked teaching notes for this specification point.

    Have a go first

    In a loop where the condition is checked at the end of the iterative structure, when is that condition first evaluated?

    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.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Programming concepts: A theoretical understanding of condition(s) at either end of an iterative structure is required, regardless of whether they are supported by the language(s) being used.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge