📱 Code Python on your phone with Python Coding - Learn PythonGet the free Android app →
  1. Home
  2. Learn
  3. Turtle projects

Guide · 3 min read

10 Python turtle projects for beginners

Ten short turtle programs, roughly in order of difficulty. Each teaches one idea — loops, functions, nested loops, recursion — and each runs in your browser with one click.

Quick answerGood Python turtle projects for beginners are: a square and polygons (loops), a colour spiral, a filled star, a smiley face (penup/goto), a chessboard (nested loops), Olympic rings (functions), a flower of circles, a staircase, a Koch snowflake and a fractal tree (recursion). Full code for all ten is below and runs online.

1. Any regular polygon

A loop that turns 360 ÷ sides each time draws any shape.

Run ▸import turtle
t = turtle.Turtle()
for sides in range(3, 9):
    for _ in range(sides):
        t.forward(50)
        t.left(360 / sides)
turtle.done()

2. Square spiral

Run ▸import turtle
t = turtle.Turtle()
t.speed(0)
for i in range(80):
    t.forward(i * 4)
    t.left(91)
turtle.done()

3. Smiley face

penup() and goto() place each part without stray lines.

Run ▸import turtle
t = turtle.Turtle()
t.speed(0)

def jump(x, y):
    t.penup(); t.goto(x, y); t.pendown()

jump(0, -100)
t.color("black", "gold"); t.begin_fill(); t.circle(100); t.end_fill()
for x in (-35, 35):
    jump(x, 30); t.dot(25, "black")
jump(-50, -20); t.setheading(-60); t.pensize(5); t.circle(58, 120)
t.hideturtle()
turtle.done()

4. Chessboard

Nested loops: one for rows, one for columns; (row + col) % 2 alternates the colour.

Run ▸import turtle
t = turtle.Turtle()
t.speed(0); t.penup()
size = 40
for row in range(8):
    for col in range(8):
        t.goto(-160 + col * size, 160 - row * size)
        t.fillcolor("black" if (row + col) % 2 else "white")
        t.begin_fill()
        for _ in range(4):
            t.forward(size); t.right(90)
        t.end_fill()
t.hideturtle()
turtle.done()

5. Olympic rings

A function with parameters avoids repeating the same five lines five times.

Run ▸import turtle
t = turtle.Turtle()
t.pensize(8); t.speed(0)

def ring(x, y, color):
    t.penup(); t.goto(x, y); t.pendown()
    t.pencolor(color)
    t.circle(45)

for x, y, c in [(-110, 0, "blue"), (0, 0, "black"), (110, 0, "red"), (-55, -50, "gold"), (55, -50, "green")]:
    ring(x, y, c)
t.hideturtle()
turtle.done()

6. Rainbow spiral of circles

Run ▸import turtle
t = turtle.Turtle()
turtle.bgcolor("black"); t.speed(0)
colors = ["red", "orange", "yellow", "green", "blue", "purple"]
for i in range(72):
    t.pencolor(colors[i % 6])
    t.circle(i * 1.5)
    t.left(5)
turtle.done()

7. Starry night

random places stars; a function draws one star of any size.

Run ▸import turtle, random
random.seed(4)
t = turtle.Turtle()
turtle.bgcolor("midnightblue"); t.speed(0); t.color("gold")

def star(x, y, size):
    t.penup(); t.goto(x, y); t.pendown()
    t.begin_fill()
    for _ in range(5):
        t.forward(size); t.right(144)
    t.end_fill()

for _ in range(25):
    star(random.randint(-280, 260), random.randint(-200, 200), random.randint(8, 30))
t.hideturtle()
turtle.done()

8. Staircase

Run ▸import turtle
t = turtle.Turtle()
t.penup(); t.goto(-200, -150); t.pendown(); t.pensize(3)
for _ in range(8):
    t.left(90); t.forward(35)
    t.right(90); t.forward(50)
turtle.done()

9. Koch snowflake (recursion)

Each side is replaced by four smaller sides — a function that calls itself.

Run ▸import turtle
t = turtle.Turtle()
t.speed(0); t.penup(); t.goto(-150, 90); t.pendown()

def koch(length, depth):
    if depth == 0:
        t.forward(length)
        return
    for angle in (60, -120, 60, 0):
        koch(length / 3, depth - 1)
        t.left(angle)

for _ in range(3):
    koch(300, 3)
    t.right(120)
t.hideturtle()
turtle.done()

10. Fractal tree (recursion)

Run ▸import turtle
t = turtle.Turtle()
t.speed(0); t.left(90); t.penup(); t.goto(0, -200); t.pendown()

def tree(length, depth):
    if depth == 0:
        return
    t.pensize(depth)
    t.pencolor("sienna" if depth > 3 else "seagreen")
    t.forward(length)
    t.left(30); tree(length * 0.7, depth - 1)
    t.right(60); tree(length * 0.7, depth - 1)
    t.left(30); t.backward(length)

tree(110, 7)
t.hideturtle()
turtle.done()

What next?

Combine ideas: a house under the starry night, a chessboard of spirals, or a forest of trees with random sizes. Commands are listed in the turtle cheat sheet, and loops get proper practice in the loop exercises.

Practise on your phone too

Python Coding - Learn Python for Android: a real Python 3 interpreter, code editor, 26 example programs and 12 marked exercises.

Get it on Google Play

Frequently asked questions

What can I make with Python turtle?

Shapes, spirals, flowers, logos, chessboards, fractals like snowflakes and trees, simple charts and animated drawings — great for practising loops, functions and recursion.

What is the easiest turtle project?

A square: four times forward(100) and left(90). Then change the 4 and 90 to draw any polygon.

How do I make turtle drawings faster?

Call t.speed(0), and on desktop use screen.tracer(0) and screen.update() for very large drawings.

Keep going

Published 2026-10-22 · Updated 2026-10-22 · by the Coding Python team · code tested on Python 3