CODE KALEIDOSCOPE

Creative Code. Colourful Thinking.

Lesson 1

Lesson 1 of 8

Lesson 1 - From Scratch to Turtle Python

Use Mu Editor to write Python Turtle commands and compare them with Scratch movement blocks.

Do Now — 5 mins Theory — 10 mins I Do — 5 mins We Do — 10 mins You Do — 20 mins Plenary — 5 mins

Lesson Journey

Use these stages to move from reading code to creating your own version.

  1. Predict
  2. Run
  3. Investigate
  4. Modify
  5. Make

Learning Aim

To understand how Scratch commands connect to Python Turtle code.

Defined End Point

By the end of this lesson, you will be able to run and modify a simple Turtle program, explaining why command order changes the output.

Key Vocabulary

sequence command syntax turtle

Do Now

Scratch vs Python

Scratch Version
Python Turtle Version
  1. What is similar?
  2. What is different?
  3. Which version do you think is easier to read?
  4. What do you think the Python code will do?

Stretch: Circle or list any words you recognise from Scratch.

Retrieval Practice

  • What is an algorithm?
  • What does the move block do in Scratch?
  • What is sequence?

Theory

Look at the short Turtle program before running it. Think about what the turtle will draw first.

Read the code first. Do not run it yet.

from turtle import *

forward(100)
right(90)
forward(100)

Prediction question

What path do you think the turtle will draw? Which command changes direction?

I Do

Step 1

Open Mu Editor

Step 2

Type the code below

Step 3

Run and experiment

Set Up Mu Editor

Watch how to open Mu Editor and get ready to write your Turtle code.

Type this code into Mu Editor and run it.

from turtle import *

forward(100)
right(90)
forward(100)
right(90)
forward(100)
right(90)
forward(100)

Typing the code yourself helps build Python fluency and debugging skills.

Code Along

Pause the video and try each step in Mu Editor before continuing.

We Do

Look closely at the code and connect each line to what the turtle does on screen.

Angle

What happens if the angle changes?

Repeat

What happens if the loop repeats more times?

Colour

Which line controls colour?

You Do

Change one part at a time so you can see what each command controls.

Change colour
Change pen size
Change shape size
Alter loop values

Type this model into Mu Editor, then modify one command at a time.

from turtle import *

color("purple")
pensize(3)

forward(100)
right(90)
forward(100)
right(90)
forward(100)
right(90)
forward(100)

Typing the code yourself helps build Python fluency and debugging skills.

Workbook Activity

Create your own Turtle artwork using sequence, movement and repeated turns.

Bronze

Draw a simple shape using Turtle commands.

Silver

Add colour and pen size changes.

Gold

Create a small artwork using repeated movement and turns.

WAGOLL

Example code and output.

Use the example to connect the Python instructions with the visual result.

Example code

from turtle import *

forward(100)
right(90)
forward(100)
right(90)
forward(100)
right(90)
forward(100)

Example Output

This WAGOLL shows a successful Turtle program created using sequence and movement commands.

Plenary

Explain what you learned and identify the next improvement you would make.

Extension task

Change the angle and predict how the Turtle path will change before you run the code.

Plenary question

  • How is Turtle similar to Scratch?
  • Why does sequence matter?
  • What changed when you changed the order of commands?
Lesson Hub ←  Previous Next  →