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
Algorithms
Coding and choosing algorithms
- 3 things to know
- Papers 1 and 2
Overview
Turning pseudocode into Python, how data structures and data values affect the choice of algorithm, and judging fitness for purpose.
What you need to know
Answer each one before you reveal it.
How is the pseudocode SET Total TO Total + Mark written in Python?
How is the pseudocode FOR Count FROM 1 TO 10 DO written in Python?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What does coding an algorithm in a high-level language involve?
Model answer
The programmer turns each step of the algorithm into statements of a language such as Python. The program is then tested to check it works.
- 2
How is the pseudocode SET Total TO Total + Mark written in Python?
Model answer
The statement is written in Python as total = total + mark, or total += mark.
- 3
How is the pseudocode FOR Count FROM 1 TO 10 DO written in Python?
Model answer
The loop is written in Python as for count in range(1, 11):. The range stops one before its upper value.
- 4
How is the pseudocode RECEIVE Age FROM (INTEGER) KEYBOARD written in Python?
Model answer
The input is written in Python as age = int(input()). The int function converts the string entered into an integer.
- 5
How does the data structure affect the choice of algorithm?
Model answer
A sorted array allows a fast binary search. An unsorted array needs a linear search or must be sorted first.
- 6
How do the data values affect the choice of algorithm?
Model answer
A small amount of data can be handled by a simple algorithm such as bubble sort. A very large amount of data needs an efficient algorithm such as merge sort.
Other ways to work this
The same content, four other ways.
Everything in your subscription
Runs, plus a mode for every other kind of session.
Every question in Algorithms, 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.