Learn
Learn Python in your browser
Free, curriculum-mapped Python tutorials for UK secondary school Computer Science. Every example runs in the browser via RunPy — no install, safe on school networks, works on KS3 through A Level. Board-agnostic: covers OCR J277, AQA 8525, Pearson Edexcel, Eduqas and WJEC GCSE Computer Science.
Perfect for classroom lessons, GCSE and A Level revision, and independent or home-schooled learners: each unit is self-contained, browser-runnable, and free.
Try the full lessons free
Creating a free RunPy account unlocks the whole of Unit 1 (Input, Output and Variables) with fully interactive lessons, checked tasks and instant feedback — plus a selection of the exam-style questions from Unit 16, so learners can practice on real GCSE-style content before committing.
No card required. No install. Works on any school-managed device. Perfect for pupils revising at home or trying RunPy in class.
Units
Python basics: print, variables and input
Free UK-curriculum introduction to Python for KS3 and GCSE Computer Science. Learn print(), variables, and reading user input, with runnable examples in your browser.
Python data types and type casting
GCSE Computer Science Python lesson on data types: strings, integers, floats, booleans, and casting between them with int(), float() and str(). Free, browser-based, runnable examples.
Python arithmetic operators and expressions
GCSE Python lesson on arithmetic operators and expressions: addition, subtraction, multiplication, real vs integer division, modulo and exponentiation. Runnable in-browser examples.
Python selection: if, elif and else
GCSE Python lesson on selection: if, elif, else, comparison operators (==, !=, <, >, <=, >=), and Boolean logic (and, or, not). Free, browser-based, runnable examples.
Python string manipulation
GCSE Python lesson on strings: indexing, slicing, len(), .upper(), .lower(), .strip(), .split(), concatenation, and f-strings. Runnable in-browser examples.
Python while loops
GCSE Python lesson on while loops: condition-controlled iteration, avoiding infinite loops, input validation, and using break. Runnable in-browser examples.
Python for loops and range()
GCSE Python lesson on for loops: range(), iterating over strings and lists, nested loops. Runnable in-browser examples for KS3, KS4 and GCSE Computer Science.
Python functions: def, parameters and return
GCSE Python lesson on functions: defining with def, parameters, return values, scope. Runnable in-browser examples for KS4 and A Level Computer Science.
Decomposition and abstraction
GCSE Computer Science lesson on decomposition and abstraction: splitting problems into functions, hiding detail, and structuring larger programs. Runnable Python examples.
Python libraries and modules
GCSE Python lesson on libraries and modules: import statement, random, math, and using standard-library functions. Runnable in-browser examples.
Python lists
GCSE Python lesson on lists: creating, indexing, slicing, appending, removing, and iterating with for. Runnable in-browser examples for KS4 and A Level.
Python list algorithms
GCSE Python lesson on standard list algorithms: totalling, counting, finding min and max, linear search, and filtering. Runnable in-browser examples.
Python 2D lists
Python lesson on two-dimensional lists (lists of lists) for grids and tables: indexing rows and columns, nested for loops. Runnable in-browser examples.
Python file handling
GCSE Python lesson on file handling: open(), read(), readlines(), write(), and using with-blocks to read and write .txt files. Runnable in-browser examples.
Debugging Python programs
GCSE Python lesson on debugging: reading tracebacks, distinguishing syntax errors from runtime errors and logic errors, and systematic bug hunting. Runnable in-browser examples.
GCSE Python exam-style questions: how to approach them
Guidance on approaching GCSE Computer Science Python exam-style questions: how to plan an answer, common traps, and marking scheme conventions across OCR, AQA, Edexcel and Eduqas.