Fun with Flags – Part 1: flags and turtles

Step 6 – Getting clever with colours

There are some smart things we can do with colours and turtles.

  1. Change your code by removing the begin_fill() and end_fill() lines
  2. Run the code and see what this does

The turtle can draw lines without colouring anything in

Turtle image
  1. Delete the last right(90) and forward(120) lines
  2. Run the code and see what this does

This should create a shape that's not finished. It should look like the screenshot

  1. Now add back in the begin_fill() and end_fill() lines
  2. Run the code and see what this does now

The shape fills in even though you haven't finished it off. That's interesting (and quite useful).

Code helper imageNow try this:

  1. Change your code to match the screenshot

    This creates just a two sided shape.

  2. Run the code and see what this does now

The fill commands have some interesting ways of working.

All the colours

Here's a set of colour names that the Python turtle knows.

Python colours image

Be careful when you type the names of colours. Some of them are quite tricky to spell!