Programming Constructs and Operators | Edexcel International GCSE Computer Science (4CP0)
Guide overview All 20 topics Sample questions Papers and weighting Look inside Questions and answers
Programming Constructs and Operators
- 45 questions
- 5 subtopics
- Paper 1
- Paper 2
Programming Constructs and Operators is examined in Paper 1, Principles of Computer Science, and Paper 2, Application of Computational Thinking.
It covers the structure of a program; selection; iteration; arithmetic operators; and relational and logic operators.
Sample questions from Programming Constructs and Operators
Answer each one closed book first, then open the answer.
-
The structure of a program
Name the structural components of a program.
Show the answer
A program is built from variable and type declarations, command sequences, selection and iteration. Programs also use data structures and subprograms. -
The structure of a program
Why do programs use data structures?
Show the answer
Data structures such as arrays hold many related values under one name. The program can then process all the values with a loop. -
Selection
How does an IF statement work?
Show the answer
An IF statement tests a condition. The commands inside run only if the condition is true. -
Selection
How is a choice between more than two options made in Python?
Show the answer
Python uses if, then one or more elif branches, then an optional else. The first branch whose condition is true runs. -
Iteration
What is a count-controlled loop?
Show the answer
A count-controlled loop repeats a fixed number of times, such as FOR Count FROM 1 TO 10. -
Iteration
What is a nested loop?
Show the answer
A nested loop is a loop inside another loop. The inner loop runs completely for each pass of the outer loop. -
Arithmetic operators
Name the six arithmetic operators.
Show the answer
The six arithmetic operators are add, subtract, multiply, divide, modulus and integer division. -
Arithmetic operators
How can the modulus operator test whether a number is even?
Show the answer
A number is even if dividing it by 2 leaves no remainder. The test is number % 2 == 0.
The 5 subtopics
One subtopic is one session. Work down the list.
| Subtopic | What it covers | Questions |
|---|---|---|
| The structure of a program | The structural components of a program: declarations, command sequences, selection, iteration, data structures and subprograms. | 8 |
| Selection | IF, ELSE and nested IF statements and Python if, elif and else chains, with worked outputs. | 8 |
| Iteration | Count-controlled and condition-controlled loops, WHILE, REPEAT UNTIL and REPEAT n TIMES, nested loops and infinite loops. | 9 |
| Arithmetic operators | The six arithmetic operators, including modulus and integer division, their pseudocode and Python symbols and worked uses. | 9 |
| Relational and logic operators | The relational operators and AND, OR and NOT, how they are written in pseudocode and Python, and how they form conditions. | 11 |
How the guide is worked
Answering a question from memory stores it far better than reading the answer again. The guide runs that as a fixed procedure on one subtopic at a time, about twenty minutes a session.
-
Step 1 · Closed book
Cover the answers. Work through one subtopic and write down what you can. Leave blanks where you have nothing.
-
Step 2 · Open book
Go back to the top. Read each printed answer and write it out in full, including the ones you had right.
-
Step 3 · Closed book again
Same questions, same order, from memory. The gap between pass one and pass three is the session result.
Read the full method, the return schedule and the research behind it.
Around this topic
Edexcel International GCSE Computer Science Active Recall Guide
Programming Constructs and Operators and every other topic, with the answers printed after each section.