Great job! You just drew your first shape in Python with Turtle! Now let’s slightly change the code we already wrote to draw a square to instead draw a hexagon. Alex is a bee, after all, and he needs to draw hexagons to build his first honeycomb.
A hexagon is a shape with six sides and six angles. Hexagons are fascinating shapes that we often see in nature! For example, bees use hexagons to build their honeycombs because this shape is very efficient; it uses the least amount of material to hold the most honey.
To help you draw a hexagon, think of how many sides a hexagon has. Now, let’s find out how many degrees should the turtle turn?
Hint:
Remember: If you divide 360 degrees by the number of sides of the shape, you’ll get the angle you need to turn.
Show answer:
The turtle needs to draw 6 sides of the hexagon. So, 360 degrees ÷ 6 turns = 60 degrees per turn.
As a helpful reminder, this is the code that was used to create a triangle:
foriinrange(3):turtle.forward(50)turtle.left(120)
Extra Challenge:
If you’ve finished early, try modifying your code and try to draw more complex shapes! Here are some examples of shapes you can try to draw.