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.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
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
- Explain how programs store data in variables and constants, describe the common data types (integer, real, Boolean, character and string), and explain why the correct data type is chosen.
A CCEA GCSE Digital Technology answer on data, variables and data types for the Programming route (Unit 4), covering variables and constants, the common data types of integer, real, Boolean, character and string, and why the correct data type is chosen.
- Explain what an algorithm is, describe how a solution is designed and represented using flowcharts, pseudocode and structure diagrams, and explain the role of interface design and decomposition.
A CCEA GCSE Digital Technology answer on algorithms and design for the Programming route (Unit 4), covering what an algorithm is, designing and representing a solution with flowcharts, pseudocode and structure diagrams, decomposition, and interface design.
- Explain how programs are tested using a test plan and normal, boundary and erroneous test data, describe syntax, logic and runtime errors, and explain how a program is evaluated against its requirements.
A CCEA GCSE Digital Technology answer on testing and evaluating programs for the Programming route (Unit 4), covering test plans and normal, boundary and erroneous test data, the types of error (syntax, logic and runtime), and evaluating a program against its requirements.
- Outline the Unit 5 Digital Development Practice controlled assessment for the Programming route, including the CCEA-set task, the analyse, design, develop, test and evaluate stages, and how the work is assessed.
A CCEA GCSE Digital Technology overview of the Unit 5 Digital Development Practice controlled assessment for the Programming route, covering the CCEA-set task, the analyse, design, develop, test and evaluate stages, and how the practical programming work is assessed.
- Distinguish systems software from application software, describe the functions of an operating system and common utility programs, and explain the role of the user interface.
A CCEA GCSE Digital Technology answer on software, covering the difference between systems software and application software, the functions of the operating system, utility programs, and types of user interface.
Sources & how we know this
- CCEA GCSE Digital Technology (2017) specification — CCEA (2017)