Community resourceWorksheet

TUR-01 Turtle Steps — direct functions

Part 1 of 6 · Python Turtle (direct functions)

Build confidence with Python Turtle by turning movement instructions into simple drawings.

Students will:

  • use forward movement and turns to control a Turtle
  • combine instructions in the correct sequence
  • store useful drawing values in variables

Inside: guided Turtle examples, short checks and practical coding tasks.

Series: Python Turtle (direct functions), part 1 of 6.

Shared by Coding PathwayVerified teacher

  • 24 cells
  • About 45 minutes
  • CC BY-SA 4.0
  • Shared 16 Sept 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Turtle Steps

In this lesson, you will use Python Turtle to draw lines and regular shapes. You will also store values in variables so you can change a drawing more easily.

Meet Python Turtle

Python Turtle lets your code control a small arrow on a drawing canvas. Imagine that the arrow is carrying a pen. When it moves, it leaves a line behind.

We first import the Turtle drawing tools:

from turtle import *

Then we can give direct instructions:

  • forward(80) moves forward by 80 steps;
  • right(90) turns clockwise;
  • instructions run from top to bottom, one at a time.

The number inside the brackets gives the instruction some information. You can change a number and run the cell again to see what changes.

Multiple choice1 mark

Which instruction turns the Turtle clockwise without moving it forward?

  • Aforward(90)
  • Bright(90)
  • Cpenup()
  • Dgoto(90, 0)

What is a variable?

A variable is a name that stores a value while a program runs. A clear name helps us remember what the value is for.

side_length = 80
forward(side_length)

The first line stores 80 using the name side_length. The next line uses the stored value. If you change 80 once, every instruction that uses side_length can use the new value.

Python variable names cannot contain spaces, so an underscore _ can join words together.

Multiple choice1 mark

Which line stores the number 80 in a variable named side_length?

  • A`80 = side_length`
  • B`side length is 80`
  • C`side_length == 80`
  • D`side_length = 80`

Run a first example

Run the code. Watch the Turtle draw two sides of a square. The same variable controls both side lengths.

Worked example
from turtle import *
speed(4)

side_length = 80
forward(side_length)
right(90)
forward(side_length)
Multiple choice1 mark

If side_length changes from 80 to 120, what will happen when the example runs again?

  • ABoth straight lines become longer.
  • BOnly the first line becomes longer.
  • CThe turn becomes 120 degrees.
  • DThe code repeats 120 times.

Finish and change the square

Add the missing movement and turn instructions to close the square. Then change side_length and run it again.

When that works, add a rectangle beside it. Lift the pen before moving to the new starting position.

Need a safe-movement reminder?
penup()
goto(120, 0)
pendown()
Starter code
from turtle import *
speed(0)

side_length = 80
forward(side_length)
right(90)
forward(side_length)
right(90)
Written answer

Why is side_length useful when the same distance is used more than once?

Think about how many values you need to change to resize the shape.

Students type their answer here.

Turning around a shape

A regular shape has equal sides and an equal turn at each corner.

At each corner, the Turtle turns on the outside of the shape. This is called the external angle.

When a complete regular shape closes, all its outside turns add up to one full turn: 360 degrees. Share that full turn equally between the sides:

turn_angle = 360 / sides

You do not need to remember a separate turn angle for every shape. Store the number of sides and let Python calculate it.

Fill in the blanks2 marks
A regular shape has gap 1 degrees of turning altogether. Its external turn angle is 360 divided by the number of gap 2.
  • 360
  • 180
  • sides
  • corners inside the shape

Build a triangle

A regular shape turns through a full 360 degrees. Find the external turn angle with:

turn_angle = 360 / sides

The code provided draws only one side and one turn. Add what is needed to close the triangle. Do not replace the calculation with a remembered angle.

Stuck after the first side?

Each side needs the same pair of actions: move with forward(side_length), then turn using turn_angle. Count how many pairs a triangle needs.

Starter code
from turtle import *
speed(0)

sides = 3
side_length = 90
turn_angle = 360 / sides

forward(side_length)
right(turn_angle)

Work out two more shapes

The next two cells give you only the number of sides. For each shape, you need to:

  1. choose and store a side length;
  2. calculate the external turn angle;
  3. add enough movement and turn instructions to close the shape.

Do not use a for loop yet. Lesson 2 will show you how a for loop makes this repeated code shorter.

Need one reminder?

Use turn_angle = 360 / sides. Then repeat the same move-and-turn pair once for every side.

Pentagon

Complete the cell to draw a regular pentagon. Choose a side length that will fit comfortably on the canvas.

Starter code
from turtle import *
speed(0)

sides = 5

Hexagon

Now complete a new program for a regular hexagon. Work it out from sides rather than copying a turn angle from somewhere else.

Starter code
from turtle import *
speed(0)

sides = 6

Core check

You are ready to move on when you can:

  • use a variable in more than one instruction;
  • close a square, triangle, pentagon and hexagon;
  • calculate an external turn using 360 / sides.

Extension: draw a five-point star

A five-point star needs five equal lines. It turns across the middle instead of following the outside of a regular pentagon. This means 360 / number_of_points will not make the star.

Add variables for line_length and turn_angle. Then add the same movement-and-turn pair five times. Run the cell and adjust only turn_angle until the points meet.

Need a starting range for the star turn?

Choose a turn between 140 and 150 degrees. If the star does not close, change the turn by one degree at a time and run it again.

Starter code
from turtle import *
speed(0)

number_of_points = 5
Written answer

Name one variable you used today and state what it controlled.

Use one short sentence.

Students type their answer here.