Learn to program

Four independent courses, each starting at the foundations: lessons that explain what is happening underneath, and exercises to practise. 282 lessons and 1130 exercises in all.

Run the exercises

This is the read-only edition: you can read every lesson, try the quizzes, and see hints and reference solutions. To write code and have it checked automatically in a safe sandbox, run learnprog on your own computer.

Download learnprog (Python 3.11+ and rootless podman or docker; no Python packages needed). Unpack it, then:

cd learnprog
bin/learnprog sandbox build   # build the exercise sandbox once
bin/learnprog                 # terminal interface
bin/learnprog web             # browser interface