Skip to main content
Northern IrelandDigital TechnologySyllabus dot point

What are the three basic programming constructs of sequence, selection and iteration, and how does each control the flow of a program?

Describe the three basic programming constructs, sequence, selection and iteration, explain how each controls the flow of a program, and identify when each is used.

A CCEA GCSE Digital Technology answer on programming constructs for the Programming route (Unit 4), covering the three basic constructs of sequence, selection and iteration, how each controls the flow of a program, and when each is used.

Generated by Claude Opus 4.810 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Sequence
  3. Selection
  4. Iteration
  5. Combining the constructs
  6. Why this matters

What this dot point is asking

The flow of a program, the order in which its instructions run, is controlled by three basic building blocks. The Programming route (Unit 4, Digital Development Concepts) expects you to name and describe the three constructs, sequence, selection and iteration, explain how each controls the flow, and say when each is used. Every algorithm and program you read, design or write is built from these three, so they are central to the route.

Sequence

The simplest construct is sequence: the program carries out its instructions one after another, in the order they are written.

Order matters in a sequence, because each step may depend on the one before. For example, a program must ask for a number before it can use that number in a calculation, and it must calculate a total before it can display it. Getting the sequence wrong, such as trying to use data before it has been input, produces incorrect results even if every individual instruction is correct.

Selection

Selection lets a program make a decision and choose between different paths.

Selection is what gives a program the ability to respond differently to different situations, for example printing "Pass" or "Fail" depending on a mark, or unlocking an account only if the password is correct. Without selection a program could only ever do the same thing every time.

Iteration

Iteration, or looping, repeats a set of instructions.

There are two kinds. A count-controlled loop (such as a FOR loop) repeats a fixed number of times, for example printing the numbers 1 to 10. A condition-controlled loop (such as a WHILE loop) repeats while a condition stays true, for example asking for a password until the correct one is entered, where the number of repeats is not known in advance. Iteration saves writing the same instructions many times and lets a program handle repeated tasks of any length.

Combining the constructs

Real programs use all three constructs together, and the exam often asks you to identify them in a scenario.

Why this matters

Sequence, selection and iteration are the three building blocks of every algorithm and program in the Programming route. They are examined directly in Unit 4 and used in every design and piece of code you produce for the Unit 5 practical. Being able to name them, describe how each controls the flow, and identify them in a scenario is fundamental to reading and writing programs.

Exam-style practice questions

Practice questions written in the style of CCEA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

CCEA-style (Unit 4)3 marksName the three basic programming constructs and describe what each one does.
Show worked answer →

The three constructs are sequence, selection and iteration (1 mark for naming all three).

Sequence: instructions are carried out one after another, in order. Selection: the program chooses between different paths depending on whether a condition is true or false, for example using IF. Iteration: a set of instructions is repeated, either a fixed number of times or while a condition holds, for example using a loop (2 marks for clear descriptions of all three). A strong answer pairs each construct with what it does to the flow of the program: in order, choosing a path, or repeating.

CCEA-style (Unit 4)4 marksA program asks a user to enter a password and keeps asking until the correct one is entered, then prints a welcome message. Identify which constructs are used and explain where each is needed.
Show worked answer →

Iteration is used to keep asking for the password until the correct one is entered, because the request is repeated while the password is wrong, which is a condition-controlled loop (2 marks: one for identifying iteration, one for explaining it repeats while the condition holds).

Selection is used to check whether the entered password is correct, choosing whether to keep looping or to continue (1 mark). Sequence is used to print the welcome message after the loop ends, as the final step carried out in order (1 mark). A strong answer ties each construct to the exact place it is needed in the program, rather than just listing the three.

Related dot points

Sources & how we know this