Edexcel IGCSE Computer Science 4CP0
Algorithms
Searching and Sorting Algorithms
Decomposition and Abstraction
Developing and Testing Code
Programming Constructs and Operators
Data Types and Data Structures
Input, Output and Validation
Data Representation
Data Storage and Compression
Encryption
Hardware and the CPU
Software
Programming Languages and Translators
Networks
Network Security
The Internet and the World Wide Web
Emerging Trends, Issues and Impact
Programming Constructs and Operators
- 5 subtopics
- 15 things to know
- Papers 1 and 2
Learn Programming Constructs and Operators in runs of four questions, then keep it with spaced repetition.
What Programming Constructs and Operators covers
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.
Where it is assessed
Papers 1 and 2
Computer Science 4CP0: this topic is examined on Paper 1, Principles of Computer Science (2 hours, 50%), and on Paper 2, Application of Computational Thinking (3 hours, on screen, 50%).
Check the Pearson Edexcel specification ↗The 5 subtopics
Each one has its own page.
- The structure of a programThe structural components of a program: declarations, command sequences, selection, iteration, data structures and subprograms.Open →
- SelectionIF, ELSE and nested IF statements and Python if, elif and else chains, with worked outputs.Open →
- IterationCount-controlled and condition-controlled loops, WHILE, REPEAT UNTIL and REPEAT n TIMES, nested loops and infinite loops.Open →
- Arithmetic operatorsThe six arithmetic operators, including modulus and integer division, their pseudocode and Python symbols and worked uses.Open →
- Relational and logic operatorsThe relational operators and AND, OR and NOT, how they are written in pseudocode and Python, and how they form conditions.Open →
What you need to know
Answer each one before you reveal it.
What is the result of 23 / 4, 23 // 4 and 23 % 4 in Python?
Which symbols does the pseudocode command set use for modulus, integer division and exponent?
How are equal to and not equal to written in the pseudocode command set?
How does an IF ... ELSE statement work?
What is a count-controlled loop?
Name the structural components of a program
Write Python code that prints Adult for an age of 18 or more and Child otherwise
What is the difference between a WHILE loop and a REPEAT UNTIL loop?
What symbols are used for the relational operators in Python?
What is a variable declaration?
Write Python code that gives grade A for 70 or more, B for 50 to 69 and U below 50
Write Python code that keeps asking for a password until the user enters secret
Name the six arithmetic operators
Why is == used for comparison in Python rather than =?
Take Programming Constructs and Operators further
The same content, four other ways.
Commonly confused
Pairs that lose marks when they are blurred together.
Count-controlled loop vs Condition-controlled loop
Count-controlled loop: a loop that repeats a fixed number of times. Condition-controlled loop: a loop that repeats until a condition changes.
Modulus vs Integer division
Modulus: an operator giving the remainder after division. Integer division: an operator giving the whole-number part of a division.
AND vs OR
AND: a logic operator giving True only when every condition is true. OR: a logic operator giving True when at least one condition is true.
Questions from this topic
Each one with the model answer underneath.
- 1
Name the structural components of a program.
Model answer
A program is built from variable and type declarations, command sequences, selection and iteration. Programs also use data structures and subprograms.
- 2
What is a variable declaration?
Model answer
A variable declaration names a variable and, in some languages, states its data type before it is used.
- 3
Why does the order of statements in a command sequence matter?
Model answer
Each statement may use a value set by an earlier statement. The sequence SET Price TO 10, SET Price TO Price * 2, SEND Price TO DISPLAY outputs 20. Swapping the last two statements outputs 10 instead.
- 4
Why do programs use data structures?
Model answer
Data structures such as arrays hold many related values under one name. The program can then process all the values with a loop.
- 5
Why do programs use subprograms?
Model answer
Subprograms split a program into named blocks that each do one task. A block can be called whenever it is needed.
- 6
Identify the structural components in this Python code: total = 0, then for mark in marks: if mark > 50: total = total + 1.
Model answer
The code uses a variable, a data structure called marks and a FOR loop for iteration. An if statement provides selection.
Everything in your subscription
Runs, plus a mode for every other kind of session.
Programming Constructs and Operators revision questions
- What does Programming Constructs and Operators cover in Edexcel IGCSE Computer Science?
- 5 subtopics: the structure of a program, selection, iteration, arithmetic operators and relational and logic operators. Each one has its own page with questions and model answers.
- How is Programming Constructs and Operators organised?
- By the Edexcel 4CP0 specification, subtopic by subtopic, so it matches the order you are taught it in.
Every question in Programming Constructs and Operators, on a schedule.
Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.