Answers for "wap to draw the shape of hexagonn in python"

1

wap to draw the shape of hexagonn in python

# import the turtle modules
import turtle
 
# Define a Turtle Instance
t = turtle.Turtle()
 
# executing loop 6 times for 6 sides
for i in range(6):
     # Move forward by 100 units
    t.forward(100)
     # Turn left the turtle by 60 degrees
    t.right(60)

turtle.done()
Posted by: Guest on February-26-2022

Code answers related to "wap to draw the shape of hexagonn in python"

Python Answers by Framework

Browse Popular Code Answers by Language