Four lines and four quarter-turns make a square — but the same two lines repeat four times.
6 / 14
The same square, with a loop
import turtle
t = turtle.Turtle()
for side in range(4):
t.forward(100)
t.right(90)
turtle.done()
Output: the same square, drawn on screen.
Same square, in a third of the lines: “do these two moves four times.”
7 / 14
Colors and lifting the pen
color() changes the pen's color — color names are plain English words in quotes: “red”, “blue”, “green”, “purple”, “orange”
penup() lifts the pen so the turtle moves without drawing; pendown() puts it back down
Together they let you draw in several colors without connecting lines
If you misspell a color, Turtle will tell you — another friendly error message
8 / 14
Colors and penup in code
import turtle
t = turtle.Turtle()
t.color("red")
for side in range(4):
t.forward(100)
t.right(90)
t.penup()
t.forward(150)
t.pendown()
t.color("blue")
t.circle(50)
turtle.done()
Output: a red square and a blue circle, drawn on screen.
Run in IDLE: a red square, a silent move of 150 steps, then a blue circle of radius 50.
9 / 14
Design a shape of your own
A triangle is three sides and three turns of 120 degrees (3 × 120 = 360, a full turn)
A house is a square plus a triangle roof
A star takes five sides and 144-degree turns — try it and see why the angle is not the obvious one
The habit to build: guess, run, look at what actually happened, and adjust — with Turtle, the feedback is a picture
10 / 14
Hands-on exercise
Draw a square with a loop, exactly like the lesson, and run it in IDLE
Change the loop to draw a triangle (3 sides, 120-degree turns) and run it
Draw two shapes in different colors, using penup() and pendown() to move between them without a connecting line
Invent one shape of your own — a house, a star, or anything else — and write down how many sides and what turn angle it needed
11 / 14
Key takeaways
Turtle is built into Python: import turtle, then t = turtle.Turtle()
forward() and backward() move; right() and left() turn in degrees
A loop plus Turtle turns repetition into pictures you can see
color() changes pen color; penup() / pendown() control whether movement draws
circle(50) draws a circle of radius 50; turtle.done() keeps the window open
12 / 14
Take the quiz
Take the Lesson 11 quiz — 5 quick questions to check what you learned.
13 / 14
Next lesson
Lists: Many Items, Plus Indexing and Append
14 / 14
Press play on any slide and the lesson plays on by itself from there. You can still click Next or click a slide to move on.