Community resourceWorksheet

TUR-03 Colourful Canvas — direct functions

Part 3 of 6 · Python Turtle (direct functions)

Explore Turtle colour and pen controls while building increasingly expressive drawings.

Students will:

  • change pen and fill colours
  • control pen width and drawing state
  • combine repetition with visual choices

Inside: guided examples, knowledge checks and colourful coding tasks.

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

Shared by Coding PathwayVerified teacher

  • 18 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.

Colourful Canvas

In this lesson, you will add colour, fill shapes and choose where they appear on the canvas. By the end, you will combine several shapes to make a small picture.

Pen colour and fill colour

pencolor("navy") changes the colour of the outline. fillcolor("gold") chooses the colour that will go inside a closed shape.

Colour names are text, so they need quotation marks. You can also store a colour name in a variable:

colour = "orange"
fillcolor(colour)
Multiple choice1 mark

A program stores "orange" in colour and then uses fillcolor(colour). What happens if colour changes to "purple"?

  • AThe shape becomes larger.
  • BThe shape fills purple.
  • CThe Turtle turns purple but the fill stays orange.
  • DThe for loop repeats more times.

How a fill works

Use begin_fill() before drawing the boundary. Draw every side so the shape closes. Then use end_fill() to add the chosen colour.

Run the example and notice where the fill instructions appear before and after the for loop.

Worked example
from turtle import *
speed(4)

side_length = 80
colour = "orange"
pencolor("dark red")
fillcolor(colour)
begin_fill()
for count in range(4):
    forward(side_length)
    right(90)
end_fill()
Fill in the blanks2 marks
Put the fill stages in order.

gap 1
# draw a complete closed shape
gap 2
  • begin_fill()
  • end_fill()
  • penup()
  • goto(0, 0)
Multiple choice1 mark

Why should the Turtle finish every side before ending the fill?

  • AThe Turtle must return to the centre.
  • BEvery filled shape must have four sides.
  • CThe pen must be lifted before every turn.
  • DThe shape needs a closed boundary.

Change it, then add another

Change the first shape's size and colours. Then create variables called second_size and second_colour. Move to a new position and use those variables to draw a second filled shape with a for loop.

How do I move without a joining line?

Use the safe pattern in this order:

penup()
goto(120, 40)
pendown()
Starter code
from turtle import *
speed(0)

side_length = 80
colour = "gold"
fillcolor(colour)
begin_fill()
for count in range(4):
    forward(side_length)
    right(90)
end_fill()

penup()
goto(120, 40)
pendown()

Positions on the canvas

The centre of the canvas is (0, 0). A position has two numbers: (x, y).

  • x moves left or right. Negative is left; positive is right.
  • y moves down or up. Negative is down; positive is up.

Use penup() before goto(x, y) if you do not want a joining line. Put the pen down again before drawing.

Multiple choice1 mark

The Turtle is at (0, 0). Which coordinate is to the left and above it?

  • A(-120, 60)
  • B(120, 60)
  • C(-120, -60)
  • D(120, -60)
Fill in the blanks3 marks
Complete the safe movement pattern.

gap 1
gap 2
gap 3
  • penup()
  • goto(-120, 60)
  • pendown()
  • begin_fill()
  • right(90)

Make a mini-picture

Create a picture from at least three closed shapes. Use a for loop for each regular shape, at least two fill colours and goto(x, y) to place shapes apart.

The code below sets up a night sky and provides two variables. It does not draw the first shape for you. Use the earlier example and your successful second shape when you need a reminder.

Need a picture idea?

Try one of these:

  • a robot face made from squares and rectangles;
  • a small town made from houses and windows;
  • a pattern of coloured triangles, squares and hexagons.

Keep the first idea simple enough to finish.

A shape will not fill

Check that begin_fill() comes before the for loop, end_fill() comes after it, and the for loop closes every side.

Starter code
from turtle import *
bgcolor("midnight blue")
speed(0)

shape_size = 80
shape_colour = "gold"
Written answer

If two separate shapes have an unwanted line between them, which three commands would you check or add?

Name the commands in order.

Students type their answer here.

Core check

Your mini-picture meets the core goal when it has:

  • three closed shapes;
  • a for loop;
  • at least two fill colours;
  • safe movement using penup(), goto(x, y) and pendown().

Optional picture challenge

Improve the mini-picture in the same code cell. Choose one challenge:

  • store the positions of two shapes in variables;
  • use a for loop to add a repeated pattern of small shapes;
  • change the canvas background and choose colours that remain easy to see;
  • build one object from two different regular shapes.

Complete the core check first. A clear, working picture is more important than adding every challenge.

Written answer

Which part of your mini-picture will you reuse or improve in the scene project?

Name one useful shape or technique.

Students type their answer here.