Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from turtle import *
- t=Turtle()
- colors = ["violet","indigo","blue","green","yellow","orange","red"]
- distance=0
- while distance<5000:
- #random value for length
- a=random.randrange(40)
- #random value for angle
- b=random.randrange(360)
- t.color(colors[distance%7])
- t.forward(a)
- t.right(b)
- distance+=a
- done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement