Skip to content

Instantly share code, notes, and snippets.

@alcemirfernandes
Forked from KaueMaia/playTurtle.py
Last active August 29, 2015 14:22
Show Gist options
  • Save alcemirfernandes/82181a15edb67fc1ae00 to your computer and use it in GitHub Desktop.
Save alcemirfernandes/82181a15edb67fc1ae00 to your computer and use it in GitHub Desktop.
__author__ = 'kaue'
import turtle,time
colors = ['red', 'purple', 'blue', 'green', 'yellow', 'orange', 'pink']
t1=turtle.Pen()
turtle.bgcolor('black')
t1.speed(0)
for x in range(1000):
t1.pencolor(colors[x%7])
if x%2==0:
t1.forward(x)
else:
t1.backward((x-1))
t1.left(52)
time.sleep(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment