mithiancoding

A free Python course

Learn to code, from your first line to real programs.

Short lessons, real Python in your browser, and feedback that tells you what to fix. It starts at the very beginning and works up to algorithms, classes and projects of your own.

Nothing to install No account needed to start Free

tree.py

This is real Python. Press Run, then change a number and run it again.

How it works

Every lesson works the same way

Read a short explanation, guess what some code will do, write code yourself, then come back to it later so you don't forget it.

01

Read a little

Short explanations, with examples you can run and change.

02

Predict, then run

Guess what a piece of code will print before you run it. When you get it wrong, you find out exactly what you misunderstood.

03

Write it yourself

Exercises are checked when you press Check. If something is wrong, it tells you what and on which line.

04

Come back to it

Questions from each lesson come back for review after a day, then three days, then a week, and so on.

The course

40 units in four parts

Each unit ends with a checkpoint that opens the next one. If you already know a topic, take its checkpoint straight away and skip ahead. All 40 units are open: 405 checked exercises, and about 55 hours of lessons at a steady pace. There are also challenges for reading and fixing code, and a playground that marks programs you write yourself.

Questions

Before you start

Do I need to install anything?

No. Python runs inside your web browser, so all you need is a computer or tablet with Chrome, Edge, Firefox or Safari. The first lesson downloads Python once (about 12 MB) and your browser keeps it after that.

I have never written code. Is this for me?

Yes. The first lesson assumes nothing at all, not even what a program is. Each idea is introduced on its own, practised, and used again in later lessons.

Do I need an account?

Not to start. Your progress is saved in this browser as you go. Create a free account whenever you like and it comes with you, so you can carry on from another device.

How long does it take?

Lessons take 10 to 30 minutes, so you can do one in a lunch break, and a unit takes one to three hours. The times shown assume a steady pace. Allow 60 to 100 hours for the whole course, depending on how much extra practice you do.

Which Python is it?

Python 3.14, the current version. Everything you write here works the same on any computer with Python installed, and the final unit shows you how to set that up.

How is my code marked?

Exercises are checked by running your code against tests written for each one, so any working answer passes, not just one exact solution. In the playground, Review gives your own programs a mark out of 10 for style and common mistakes, and Tests lets you write your own checks. None of it uses AI: the same code always gets the same feedback.

I already know some Python. Do I have to start at the beginning?

No. Every unit ends with a checkpoint. Pass a checkpoint and the next unit opens, whether or not you did the lessons before it.