Start learning

Learn to write Python you understand.

Short readings, quick questions, and real code, one idea at a time.

For learners aged 5–17. Grown-ups: lessons, mentor classes and prices are on codecrafters.codes.

The playground

What will you make today?

Pick an idea, change a number, and see what happens. Python runs right here in your browser, with no account needed.

Open the playground

Start from an idea

Idea 1 / 4

Turtle Star

Steer a turtle with five lines and watch it draw a star. Change 144 and see what shape you get instead.

import turtlepen = turtle.Turtle()for side in range(5):    pen.forward(150)    pen.right(144)
Try it in the playground

Idea 2 / 4

Rainbow Spiral

Change the angle by one number and get a whole new pattern. Every colour comes from a list you can edit.

for step in range(60):    pen.color(colours[step % 5])    pen.forward(step * 3)    pen.left(59)
Try it in the playground

Idea 3 / 4

Guess the Number

A tiny game that asks you a question and answers back. Add a score, or give the player three tries.

secret = 7guess = int(input("Guess my number: "))if guess == secret:    print("You got it!")
Try it in the playground

Idea 4 / 4

Human Calculator

Type two numbers and let Python do the maths. Then teach it to divide without crashing on zero.

first = float(input("First number: "))second = float(input("Second number: "))print("Times:", first * second)
Try it in the playground

Have your own idea? Start from a blank page