Lesson 10 of 30
Lesson 10 — Draw with turtle
Title: Make colorful drawings with Python
Description: Use Python's built-in turtle module to draw lines, squares, stars, and simple art.
Why it matters for kids: Drawing makes code visible. You can see every command become part of a picture.
1. First turtle
Create draw.py:
import turtle
pen = turtle.Turtle()
pen.forward(100)
pen.right(90)
pen.forward(100)
turtle.done()A small window should open and show the turtle drawing.
2. Draw a square
import turtle
pen = turtle.Turtle()
for side in range(4):
pen.forward(100)
pen.right(90)
turtle.done()The loop repeats the same two drawing steps four times.
3. Add color
import turtle
pen = turtle.Turtle()
pen.color("purple")
pen.pensize(4)
for side in range(4):
pen.forward(120)
pen.right(90)
turtle.done()Try "red", "blue", "green", or "orange".
4. Draw a triangle
import turtle
pen = turtle.Turtle()
pen.color("green")
for side in range(3):
pen.forward(120)
pen.left(120)
turtle.done()5. Easy star
import turtle
pen = turtle.Turtle()
pen.color("gold")
for point in range(5):
pen.forward(150)
pen.right(144)
turtle.done()6. Tiny art project
import turtle
pen = turtle.Turtle()
pen.speed(8)
colors = ["red", "orange", "yellow", "green", "blue", "purple"]
for color in colors:
pen.color(color)
pen.forward(100)
pen.right(60)
turtle.done()7. Mini challenge
Click each example to open it.
Example 1
Move the turtle forward 50 steps.
Example 2
Turn the turtle right 90 degrees.
Example 3
Draw a small square.
Example 4
Draw a triangle.
Example 5
Change the pen color to red.
Example 6
Change the pen size to 4.
Example 7
Draw a line in blue.
Example 8
Use a loop to draw four sides.
Example 9
Draw a simple star.
Example 10
Make a drawing with three colors.