Draw with Python (Turtle Power)
Learn how to use turtle to draw shapes and patterns.
Let’s do something fun and creative—use Python to draw pictures.
We’ll use a built-in Python module called turtle
to control a pen on the screen.
Introducing the turtle
Try this:
import turtle pen = turtle.Turtle() pen.forward(100)
Creating a turtle and drawing a line 100 pixels long