9618 Paper 4 Python
Paper 4 is a practical paper: programs that must print exactly what is asked. Work through the steps in order — each block links to the pseudocode guide with its Python column and the topic pages — and each step is checked against hidden tests as soon as you run it.
Your progress
0 of 90 steps done
90 steps in 16 blocks. Progress follows your account when you are signed in.
- A
Block A · Python for Paper 4: data and I/O
Inputs, outputs, the data types and the conversions Paper 4 expects you to get exactly right. Steps 1–5 of 90 · 9618 §11.1
0 / 5 done
- B
Block B · Selection and iteration
IF, CASE, count-controlled, pre-condition and post-condition loops — written the Python way. Steps 6–11 of 90 · 9618 §11.2
0 / 6 done
- C
Block C · Strings and the built-in functions
LEFT, RIGHT, MID, LENGTH, UCASE, LCASE, ASC and CHR — and their Python equivalents. Steps 12–17 of 90 · 9618 §11.1 · guide §5
0 / 6 done
- D
Block D · Procedures and functions
PROCEDURE and FUNCTION in Python: parameters, RETURN, and what Python does instead of BYREF. Steps 18–23 of 90 · 9618 §11.3
0 / 6 done
- E
Block E · Arrays as lists
1D and 2D arrays as Python lists: fill, total, search, find the largest and bubble sort. Steps 24–30 of 90 · 9618 §10.1–10.2
0 / 7 done
- F
Block F · Records
A TYPE … ENDTYPE record as a Python class, and arrays of records. Steps 31–35 of 90 · 9618 §10.1
0 / 5 done
- G
Block G · Text files
OPENFILE, READFILE, WRITEFILE and EOF in Python, line by line. Steps 36–40 of 90 · 9618 §10.3
0 / 5 done
- H
Block H · Exception handling
try … except … finally around input, files and arithmetic. Steps 41–44 of 90 · 9618 §20.3
0 / 4 done
- I
Block I · Binary search and insertion sort
The A2 standard algorithms, written exactly the way the mark scheme wants. Steps 45–49 of 90 · 9618 §19.1
0 / 5 done
- J
Block J · Recursion
Base case, general case and unwinding — factorial to binary search. Steps 50–55 of 90 · 9618 §19.2
0 / 6 done
- K
Block K · Stacks and queues
An array-based stack and linear and circular queues with the pointers the mark scheme gives marks for. Steps 56–62 of 90 · 9618 §10.4 · §19.1
0 / 7 done
- L
Block L · Linked lists
Nodes in arrays with a start pointer and a free list, -1 as the null pointer. Steps 63–68 of 90 · 9618 §19.1
0 / 6 done
- M
Block M · Binary trees
A binary search tree: insert, search, the three traversals, height and leaves. Steps 69–74 of 90 · 9618 §19.1
0 / 6 done
- N
Block N · Classes and objects
Classes, constructors, private attributes, getters and setters. Steps 75–80 of 90 · 9618 §20.1
0 / 6 done
- O
Block O · Inheritance and polymorphism
Subclasses, super().__init__, overriding and containment. Steps 81–85 of 90 · 9618 §20.1
0 / 5 done
- P
Block P · Full Paper 4 tasks
Several requirements in one program, in the order a Paper 4 question builds them. Steps 86–90 of 90 · 9618 Paper 4
0 / 5 done


