Advertisement
here2share

# t_spiral_hexagon.py

May 5th, 2025
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. # t_spiral_hexagon.py
  2.  
  3. import turtle
  4.  
  5. colors = ["red", "purple", "blue", "green", "orange", "yellow"]
  6. t = turtle.Pen()
  7. turtle.bgcolor("black")
  8. t.speed(0)
  9.  
  10. for x in range(360):
  11.     t.pencolor(colors[x % 6])
  12.     t.forward(x * 1.25)
  13.     t.left(59)
  14.  
  15. turtle.done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement