mithian coding: a Python course
A free Python course where the code runs in the browser and the marking is checked on the server.
About
40 units take a learner from a first print() to classes, algorithms and projects of their own. Python 3.14 runs in the browser through Pyodide, so there is nothing to install, and input() and a Stop button work the way they would on a desktop.
Answers from signed-in learners are run again on the server, in a locked-down child process with a fresh Python for every job, so a mark cannot be faked from the browser. Teachers can set up a class, share a join code and see each student's verified work.
How it works
In the browser
Pyodide, Python compiled to WebAssembly, runs in a Web Worker. The pages are cross-origin isolated, so input() and Stop work through shared memory.
On the server
Each answer is run again in a child Node process with permission flags and an empty environment, then marked against the same tests the browser used.
In the build
Every model answer must pass, every starting point and wrong answer must fail, and every "what does this print" answer is worked out by running it. Nothing is published unless all of that holds.
Features
- Lessons, predict-the-output questions, puzzles, trace tables and bug hunts
- Feedback that names the problem and explains Python's error messages in plain words
- A checkpoint at the end of each unit that opens the next one, or tests a learner out of it
- Challenge sets, spaced practice and a playground with a code review marked out of 10
- Classes with join codes, a teacher dashboard, each student's verified code and a CSV download
- Progress kept without an account, and merged into one on sign-up
- A build check that tries to pass every exercise with hard-coded output
- Checked against WCAG 2.2 AA with axe-core, in light and dark
- Python and fonts served from the site itself