1 Drawing a square
In Lesson 1 you used t.forward() and t.right() to draw an L-shape. A square has 4 equal sides, so we write the same pair of instructions 4 times — once for each side.
Try it:
Count the t.forward(100) lines. How many are there?
Change all four 100s to 60. Click Run. Is it still a square?
2 Drawing a rectangle
A rectangle has two long sides and two short sides. We still write 4 forward-and-turn steps, but the forward numbers alternate between long and short.
Look at the four t.forward() lines. Why do they go 150, 80, 150, 80 instead of all being the same number?
3 Drawing a triangle
A triangle has 3 corners, so this time we only need 3 forward-and-turn steps. But the turn isn’t 90° this time.
A full turn all the way around is 360°. Share that between 3 corners and you get 360 ÷ 3 = 120°. So the turtle needs t.right(120) at each corner.
A square turns 90° at each corner. A triangle turns 120°. Why does a shape with fewer sides need a bigger turn?
4 Circles: a shortcut
Drawing a circle out of straight lines would take a lot of code. Turtle has a shortcut built in: t.circle(radius) draws a whole circle in one line.
Try it:
Change 60 to a bigger number, then a smaller number.
What does the number inside circle() control?
5 Now you try: a square, a triangle and a circle
Use what you’ve learned to draw all three shapes in one picture. Use t.penup() to lift the pen so moving the turtle doesn’t draw a line, then t.pendown() to put the pen back down before you draw the next shape — that way your shapes won’t overlap.
Hint:
Copy your square code from Step 1, then your triangle code from Step 3.
Finish with t.circle() from Step 4.
Remember: t.penup() before moving, t.pendown() before drawing again.
What you learned in this lesson
- a shape’s sides are drawn with
t.forward()andt.right(), one pair per side - a shape with n equal sides turns 360° ÷ n at each corner
- a square turns 90°, a triangle turns 120°
t.circle(radius)draws a circle in a single linet.penup()andt.pendown()let you move the turtle without drawing
