PLIRO / Teaching material
Program patterns and explore geometry
A hexagon starts with six equal moves and six equal turns. Investigate how repetition and the turning angle fit together, then create a shape of your own.
Start the working example01
What you will practise
- Identify a repeated part of a program.
- Investigate how six turns of 60 degrees make one full turn.
- Change a shape deliberately and compare the result.
02
What you need
- An internet-connected device with an up-to-date browser, per learner or pair.
- Paper, pencil and optionally a protractor.
- The additional worksheet is optional and written in Dutch.
Preparation
- Run the hexagon below in advance.
- Read 360 / 6 as ‘360 divided by 6’: the turning angle is 60 degrees.
- Use the first programming lesson if learners have not seen a loop before.
Teaching material
Step by step
Read the six instructions
The list contains six numbers. For each number, the turtle moves 60 and turns 360 / 6 degrees. Sketch the shape you expect.
Run the example
Open the project and choose Run. Follow the lines and count the sides. Discuss the difference between a turning angle and an interior angle.
Change the size first
Choose Code, then Text. Change forward 60 to forward 90. Leave the list and turning angle unchanged. Run again: the shape grows and keeps its six sides.
Now make a square
Use [1, 2, 3, 4] and change 360 / 6 to 360 / 4. These two values work together. Run the code and check that the shape closes.
Design and explain
Try a triangle with [1, 2, 3] and 360 / 3. Explain how many times the move repeats and why you chose that turning angle.
Try it yourself
This starting code works. Open the project, choose Code, then Text, to change something, then press Run.
# language: en
for side in [1, 2, 3, 4, 5, 6]:
forward 60
right 360 / 6
say "Hexagon finished!"
The example result
The starting program draws a regular hexagon. Six moves of 60, each followed by a 60-degree turn, bring the turtle back to the start.
Discuss what you discovered
What happens if only the number of repetitions changes? Test the idea and compare it with a closed shape.
Extra material for this lesson
A next step
