The OCR GCSE Computer Science specification sets out specific programming topics that all students must know. This pack covers every one of them โ in depth, with examples.
Variables and constants ยท Data types (int, str, float, bool) ยท Input and output ยท Arithmetic and comparison operators ยท Type conversion
IF / ELIF / ELSE ยท FOR loops with range() ยท WHILE loops ยท Nested loops ยท Nested conditionals
Defining and calling functions ยท Parameters and arguments ยท Return values ยท Default parameters ยท Local vs global scope
Lists โ creation, indexing, slicing ยท Appending and removing items ยท 2D arrays (lists of lists) ยท Accessing 2D array elements ยท Iterating over lists
Length, upper, lower, strip ยท String concatenation ยท Slicing a string ยท Finding characters with find() and in ยท Converting between string and list
Opening, reading, and writing files ยท readlines() and write() ยท Appending to a file ยท Closing files ยท The with statement
Every GCSE Python program uses variables and data types. Understanding how they work prevents the most common exam and coursework errors.
The most common runtime error in student code: mixing types without converting. input() always returns a string. To do maths: age = int(input("Age: ")). To compare: if str(score) == "10":
String manipulation appears on almost every GCSE CS Paper 1. These are the techniques you must know.
File handling is a required topic for GCSE CS Paper 1 and the NEA. Three modes: read, write, append.
with open("data.txt", "r") as f:
content = f.read()
# or
lines = f.readlines()
# or iterate:
for line in f:
print(line.strip())with open("output.txt", "w") as f:
f.write("Line 1\n")
f.write("Line 2\n")
# "w" overwrites existing contentwith open("log.txt", "a") as f:
f.write("New entry\n")
# "a" adds to existing content
# does not overwriteUsing with open(...) as f: automatically closes the file when the block ends โ even if an error occurs. Always use this pattern. Never use open() without closing the file.
Miss ICT sessions use the Starter Pack as a structured learning resource โ working through each topic with real examples and GCSE-style practice questions.
OCR GCSE CS uses Python 3. Specifically, the exam uses Python 3.x syntax. All examples in this pack are Python 3 compatible.
Object-Oriented Programming (OOP) is not required for GCSE CS. It is an A Level topic. At GCSE level, procedural programming with functions is sufficient.
String manipulation and file handling appear most frequently. Lists and 2D arrays are also heavily tested. Functions are required for higher-grade questions.