Advertisement
GeorgiLukanov87

turtlebgcolors

Mar 31st, 2022 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. import turtle
  2.  
  3. colors = ['white', 'red', 'green', 'white', 'red', 'green']
  4. t = turtle.Pen()
  5. turtle.bgcolor('black')
  6. for x in range(360):
  7.     t.pencolor(colors[x % 6])
  8.     t.width(x // 100 + 1)
  9.     t.forward(x)
  10.     t.left(59)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement