Book a lesson
HomeResourcesPython Starter Pack
GCSE Computer Science ยท Complete Reference

Python Starter Pack

The complete Python reference for OCR GCSE Computer Science โ€” every topic in the specification, with clear explanations, worked examples, and exam technique built in.

Book a GCSE sessionPython Mini Projects

What this covers

All OCR GCSE Python topics in one place
Variables, loops, functions, lists, files โ€” fully covered
String manipulation and 2D array techniques
Pseudocode comparison: OCR syntax vs Python
Exam-style questions with mark scheme explanations

What the Python Starter Pack covers

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.

Core fundamentals

Variables and constants ยท Data types (int, str, float, bool) ยท Input and output ยท Arithmetic and comparison operators ยท Type conversion

Control structures

IF / ELIF / ELSE ยท FOR loops with range() ยท WHILE loops ยท Nested loops ยท Nested conditionals

Functions

Defining and calling functions ยท Parameters and arguments ยท Return values ยท Default parameters ยท Local vs global scope

Data structures

Lists โ€” creation, indexing, slicing ยท Appending and removing items ยท 2D arrays (lists of lists) ยท Accessing 2D array elements ยท Iterating over lists

String handling

Length, upper, lower, strip ยท String concatenation ยท Slicing a string ยท Finding characters with find() and in ยท Converting between string and list

File handling

Opening, reading, and writing files ยท readlines() and write() ยท Appending to a file ยท Closing files ยท The with statement

Variables and data types โ€” in depth

Every GCSE Python program uses variables and data types. Understanding how they work prevents the most common exam and coursework errors.

Data typeExampleNotes
Integerage = 16Whole numbers only. No decimal point.
Floatprice = 9.99Decimal numbers. Use when precision matters.
Stringname = "Dee"Text. Always in quotes. Cannot do maths on a string.
Booleanis_valid = TrueTrue or False only. Note: capital T and F.
Listscores = [8,5,9]Multiple values under one name.
2D listgrid = [[0,0],[0,0]]List of lists. Access with grid[row][col].

Type conversion 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 handling โ€” the most examined topic

String manipulation appears on almost every GCSE CS Paper 1. These are the techniques you must know.

OperationPython codeResult
Lengthlen("hello")5
Upper("hello").upper()HELLO
Lower("HELLO").lower()hello
Slice("hello")[1:4]ell
First char("hello")[0]h
Last char("hello")[-1]o
Find("hello").find("l")2 (first occurrence)
Split("a,b,c").split(",")["a","b","c"]
Join",".join(["a","b","c"])a,b,c
Strip(" hello ").strip()hello
Replace("hello").replace("l","r")herro

File handling โ€” complete reference

File handling is a required topic for GCSE CS Paper 1 and the NEA. Three modes: read, write, append.

Read

with open("data.txt", "r") as f:
    content = f.read()
    # or
    lines = f.readlines()
    # or iterate:
    for line in f:
        print(line.strip())

Write

with open("output.txt", "w") as f:
    f.write("Line 1\n")
    f.write("Line 2\n")
# "w" overwrites existing content

Append

with open("log.txt", "a") as f:
    f.write("New entry\n")
# "a" adds to existing content
# does not overwrite

The with statement

Using 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.

Want to work through the Starter Pack with expert guidance?

Miss ICT sessions use the Starter Pack as a structured learning resource โ€” working through each topic with real examples and GCSE-style practice questions.

Book a GCSE sessionPython Mini Projects

Frequently asked questions

What Python version does OCR use?

OCR GCSE CS uses Python 3. Specifically, the exam uses Python 3.x syntax. All examples in this pack are Python 3 compatible.

Do I need to learn OOP for GCSE?

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.

What is the most important Python topic for Paper 1?

String manipulation and file handling appear most frequently. Lists and 2D arrays are also heavily tested. Functions are required for higher-grade questions.

Related resources

Practice

Python Mini Projects

Apply the Starter Pack content through complete projects.

Quick ref

Python Starter Guide

Condensed cheat sheet for revision.

Challenges

Coding Challenges

Timed challenges to build speed and confidence.

Support

GCSE CS Tutor

1-to-1 Python and theory support from a GCSE examiner.

Book a session โ†’
โœ” GCSE examiner ยท โœ” DBS checked