Programs and the Turtle
About this lesson

A program is an algorithm written in a language the performer understands. A performer only follows its own command set. The Turtle moves on the screen and leaves a trail. Main commands: forward N, back N, right N (turn N degrees), left N, pen up / pen down (move without or with a trail). A square needs “forward 100, right 90” four times. Shorter: repeat 4 [forward 100 right 90]. An equilateral triangle: repeat 3 [forward 100 right 120]. Rule: a full turn is 360 degrees, so divide 360 by the number of sides.
What the book shows
In grade 5 the computer science textbook has units on information, the computer, applications, algorithms and the internet. Each topic gives a short explanation, an example and a task done on or off the computer.
Textbook link:
This is not the textbook’s text but a short description of the topic. Check the exact page in your own textbook.
The lesson step by step
- 1
Warm-up5 min
Robot game: walking by commands.
- 2
New topic10 min
Program and performer.
- 3
Practice10 min
Turtle commands.
- 4
Game10 min
The repeat command.
- 5
Wrap-up5 min
Drawing polygons.
Let’s understand
For the student Simple language

| Shape | Program |
|---|---|
| square | repeat 4 [forward 100 right 90] |
| triangle | repeat 3 [forward 100 right 120] |
| hexagon | repeat 6 [forward 60 right 60] |
For the parent
How to help
- Let your child give you Turtle commands to walk around the room, “forward 3, right 90”, and see together what a wrong command does.
For the teacher
Lesson goals
- Know that a program is a sequence of commands for a performer, draw shapes with Turtle commands and use the repeat command.
How to teach it
- Hands-on computer work, unplugged modelling, pair work, mini-project
Differentiation
- Weaker pupils follow the model step by step; stronger pupils design and test their own task
Questions for the class
- How does a performer carry out a program?
How to check
The pupil writes square and triangle programs for the Turtle using repeat.
Scientific Scientific language
Why repeat?
The program gets shorter and less error-prone.
Nearly a circle
repeat 36 [forward 10 right 10] looks like a circle.
Self-study
Step by step
- I explained what a program is.
- I know the Turtle commands.
- I drew a square.
- I used repeat.
- I worked out the angle.
Going deeper
Scientific language: for older students, parents and teachers.
Turtle programming comes from the Logo language, created in the 1960s to teach children programming.
Play and check
Which shape does it draw?
How to write it down
- Write programs for a square, a triangle and a pentagon.
- Draw the Turtle’s path on squared paper.
How the classwork looks in the notebook
Sample: the date and heading follow this country’s notebook rules.
Watch out: common mistakes
Where it helps in life
- Searching the internet
At home
Core
- Write a program for a pentagon.
Extra ⭐
- Plan a program that draws two squares side by side (using pen up).
How to do it
- Do the task with a grown-up.
- Explain in words what you noticed.
Answers for parents
Pentagon: repeat 5 [forward 80 right 72] (360 ÷ 5 = 72). Two squares: repeat 4 [forward 50 right 90], pen up, right 90, forward 70, left 90, pen down, repeat 4 [forward 50 right 90].
Step-by-step homework solution — Show the solution (try it yourself first)
Think
- repeat N [forward a right 360÷N] draws any regular polygon; as N grows, the shape looks more and more like a circle.
How the homework looks in the notebook
Sample: the date and heading follow this country’s notebook rules.