Learn Python by playing a game.

A free coding game for beginners. Write real Python to guide a little robot through 55 puzzle levels, in your browser or on your phone.

Play now, it's free

How it works

Read it. Fix it. Run it.

Each level takes about five minutes.

  1. See the goal. A door to wait for, a gap to drive through, a marker to find. The robot starts with code that almost works.
  2. Change the code. Type real Python: a number, a loop, an if. There are no blocks to drag, so what you learn is the real thing.
  3. Press Run and watch. The robot does exactly what you wrote. If it misses, you can see why, change one line and run it again.
Try the first level

What you learn

From your first line of code to a robot that finds its own way.

55 levels across three places, each one adding a single new idea.

1 The lab

Where the robot is built and tested. You learn to give it instructions in order, then to save typing.

  • Your first program and waiting
  • Variables and numbers
  • for loops
  • if and else
  • Writing your own functions
  • Lists
  • Turning, lights and speed

2 The scrapyard

Gates, a baler and a crosswind. The robot has to check where it is and correct itself as it drives.

  • while loops
  • Position and heading
  • Steering by feedback
  • Avoiding obstacles
  • A maze
  • Parking in a bay

3 The overgrown city

Markers, colours and other robots. Now it has to see, decide and keep track of what it is doing.

  • Reading markers with the camera
  • Finding colours
  • List comprehensions
  • Timeouts and priorities
  • State machines
  • A rescue

It is the same Python you would use for GCSE or A level computer science, so nothing you learn here has to be unlearnt later.

Why it's fun

A game first, so you keep coming back.

Bite-sized levels. Real code. A robot that's yours.

  • Win three stars a level: beat it on easy, medium and hard
  • Travel a world map from the lab to the city
  • Outsmart other robots in the puzzle levels
  • Come back each day to keep your charge up
  • Climb the weekly league
  • Unlock paint, toppers and moves for your own robot
Play the app

Free, with no adverts and nothing to buy.

Who it's for

For anyone who wants to learn to code.

Complete beginners

The first level is three lines long. Each one after it adds one idea, and the hints tell you what to think about, never the answer.

Students

Practise the Python your course asks for in five-minute bursts. For the full course, the BugBot lessons cover every GCSE and A level programming point.

Teachers

A starter or a reward that is still programming. For a whole class, the teacher tools show you every student as they work.

FAQ

Common questions

Yes. Every level, the garage and the league are free, with no adverts and nothing to buy.

Yes. You type real Python, the same language used in GCSE and A level computer science and by working programmers, and it runs in your browser. There are no blocks to drag.

No. It runs in your browser on a phone, tablet or computer. On a phone you can add it to your home screen so it opens like an app.

Yes. The first level is three lines long, and each level adds one idea. If you get stuck, the hints tell you what to think about without giving you the answer.

Your progress saves in your browser as you play. Sign in, for free, and it follows you to any phone or computer.

The app is the game: short puzzles, stars and a robot to make your own. The lessons are the full course, 409 lessons from your first line of code to GCSE, A level and university topics. Both use the same Python and the same robot.

Play now, it's free