Free Python course · No sign-up

Python Foundations

12 original, bite-sized lessons taking you from your first program to functions, files and testing. Each includes code you can download, a challenge, a debugging task and a quick self-check.

Suitable for beginners, KS3 and GCSE students. Broader than either individual exam specification; follow alongside your OCR or AQA topic pathway.

New GCSE course: Nine guided Python programming lessons with original challenges and tested downloads →

Learning progress: 0 of 12 lessons completed in this browser. You can return and continue on this device.
Lesson 01 · Foundations

Getting started with Python

print(), comments and running a script

Start lesson →

Not marked complete

Lesson 02 · Foundations

Variables and data types

Assignment, strings, integers, floats and booleans

Start lesson →

Not marked complete

Lesson 03 · Foundations

Input and type conversion

input(), int(), float() and validation

Start lesson →

Not marked complete

Lesson 04 · Foundations

Selection with if

Conditions, comparisons and if/elif/else

Start lesson →

Not marked complete

Lesson 05 · Foundations

Boolean logic

Combining conditions with and, or and not

Start lesson →

Not marked complete

Lesson 06 · Foundations

Count-controlled loops

for loops and range()

Start lesson →

Not marked complete

Lesson 07 · Foundations

Condition-controlled loops

while loops, sentinels and avoiding infinite loops

Start lesson →

Not marked complete

Lesson 08 · Foundations

Lists and indexing

List creation, traversal and updating

Start lesson →

Not marked complete

Lesson 09 · Foundations

Strings and formatting

Character indexing, slices and formatted output

Start lesson →

Not marked complete

Lesson 10 · Foundations

Subroutines and parameters

Defining functions, arguments and return values

Start lesson →

Not marked complete

Lesson 11 · Foundations

Working with text files

Writing, reading and with-open blocks

Start lesson →

Not marked complete

Lesson 12 · Foundations

Testing and debugging

Normal, boundary and invalid data; trace and fix

Start lesson →

Not marked complete

New: Interactive Python code tracing and debugging

Step through worked code examples and try original GCSE and A-level output and debugging quizzes.

Open Python Practice →