User:-Python turtle graphics-/flower hexagon irregular
hexagon irregular
<source lang="python">
import turtle
import random
def hexagon(angle,size):
angle=60
for i in range(6):
turtle.forward(size)
turtle.left(angle)
for i in range(18):
print hexagon(60,random.randint(40,100))
turtle.color(random.randint(0,1),random.randint(0,1),random.randint(0,1))
turtle.left(20)
turtle.exitonclick()