What are the three basic programming constructs, and how are variables, constants and operators used?
The three programming constructs (sequence, selection and iteration), the use of variables and constants, and arithmetic, relational and logical operators.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on programming constructs, covering sequence, selection and iteration (including IF statements and FOR and WHILE loops), the difference between variables and constants, and arithmetic, relational and logical operators with worked examples.
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 topic is asking
WJEC wants you to know the three programming constructs (sequence, selection and iteration), the difference between variables and constants, and the arithmetic, relational and logical operators. This is part of the Algorithms and programming principles content in Unit 1 of WJEC GCSE Computer Science (3500).
The three programming constructs
Variables and constants
Operators
Try this
Q1. Name the three basic programming constructs. [1 mark]
- Cue. Sequence, selection and iteration.
Q2. State the difference between a variable and a constant. [1 mark]
- Cue. A variable's value can change while the program runs; a constant's value is fixed.
Exam-style practice questions
Practice questions written in the style of WJEC exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
WJEC-style Unit 13 marksState the three basic programming constructs and give a brief description of each.Show worked answer →
A Unit 1 constructs question. Sequence is carrying out instructions one after another in order (1 mark). Selection is choosing which instructions to run depending on a condition, for example using an IF statement (1 mark). Iteration is repeating a set of instructions, either a fixed number of times or while a condition is true, using a loop such as FOR or WHILE (1 mark). Markers reward the correct name and a brief description of each. A common error is to describe selection as repeating, which is iteration, or to give only the names without descriptions.
WJEC-style Unit 13 marksExplain the difference between a variable and a constant, and give one example of when a constant would be used.Show worked answer →
A Unit 1 programming question. A variable is a named store whose value can change while a program runs, such as a score that goes up during a game (1 mark). A constant is a named store whose value is fixed and does not change while the program runs (1 mark). A constant would be used for a value that should stay the same throughout, such as the value of pi, a VAT rate or the maximum number of players, which makes the program clearer and easier to update in one place (1 mark). Markers reward "can change" for a variable and "fixed" for a constant, with a sensible example. A common error is to say a constant can be changed during the program, which contradicts its definition.
Related dot points
- Computational thinking through decomposition and abstraction, what an algorithm is, and expressing algorithms using flowcharts and pseudocode.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on computational thinking and algorithms, covering decomposition and abstraction, what an algorithm is, and how algorithms are expressed using flowcharts (with the standard symbols) and pseudocode, with worked examples.
- The use of subprograms (procedures and functions) and parameters, and the benefits of a modular, structured approach to programming.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on subprograms and program structure, covering procedures and functions, the use of parameters, the difference between a procedure and a function, and the benefits of a modular, structured approach to writing programs.
- Boolean logic using the AND, OR and NOT operators, constructing truth tables, the logic gates, and simplifying simple logic expressions.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on logical operations, covering Boolean logic with the AND, OR and NOT operators, constructing truth tables, the matching logic gates, and simplifying simple logic expressions, with worked examples.
- The linear search and binary search algorithms, how each works, and the conditions under which each is suitable.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on searching algorithms, covering how the linear search and binary search work step by step, the requirement that binary search needs sorted data, and the relative efficiency of the two methods with worked examples.
- Low-level and high-level programming languages, the need for translators, and the differences between assemblers, compilers and interpreters.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on programming languages and translators, covering low-level (machine code and assembly) and high-level languages, why translators are needed, and the differences between assemblers, compilers and interpreters with their advantages and disadvantages.