Draw Hexagon using Turtle in Python

In this tutorial, we are going to see how to draw Hexagon using Turtle in Python. First, you have to know about the Turtle graphics that is available in Python.


  • When a user wants to create pictures and shapes, then turtle can be used which is a library in Python.
  • It almost resembles a drawing board. It is possible to move turtle with the help of many turtle functions.

The following are some of the common methods used in the turtle library.


  • We can use this method to move the turtle in a forward direction. The line is drawn behind the turtle.
  • Syntax: instance.forward(distance)


  • We can use this method to move the turtle in a backward direction.
  • Syntax: instance.backward(distance)


  • Used to turn the turtle in a left direction by a specified angle.
  • Syntax: instance.left(angle)


  • Used to turn the turtle in a right direction by a specified angle.
  • Syntax: instance.right(angle)

Some of the other methods areĀ up(), down(), width(Value), goto(x,y), setx(pos), sety(pos), and etc.



  1. First, we have imported the turtle module.
  2. Then, we created a work screen using turtle.Screen() method.
  3. Using a turtle.Turtle() class, a turtle instance is defined.
  4. Execute a loop for 6 times to draw 6 sides of a Hexagon.
  5. For each iteration, the turtle has to move 90 units forward and 300 degrees left.
  6. So, we used forward() and left() methods.

Let’s have a look at the implementation.

import turtle 
#iterate loop 6 times for 6 sides 
for i in range(6):   

When we run the above code, our output will look like the video given below:

So, I hope that you guys learned something new from this tutorial.

Leave a Reply

Your email address will not be published. Required fields are marked *