Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
Source by pythonguides.com #
 
PREVIOUS NEXT
Tagged: #wap #draw #shape #hexagonn #python
ADD COMMENT
Topic
Name
4+7 =