Skip to content

Instantly share code, notes, and snippets.

@KaueMaia
Created June 7, 2015 19:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save KaueMaia/9ff72b5795cf875c2d21 to your computer and use it in GitHub Desktop.
Save KaueMaia/9ff72b5795cf875c2d21 to your computer and use it in GitHub Desktop.
Brincando com Turtle do Python...
__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