Skip to content

Instantly share code, notes, and snippets.

@mlincoln
Created January 6, 2013 18:45
Show Gist options
  • Select an option

  • Save mlincoln/4469370 to your computer and use it in GitHub Desktop.

Select an option

Save mlincoln/4469370 to your computer and use it in GitHub Desktop.
drawing program
import random
import turtle
length = 250
iterations = 50
def drawer():
T=turtle.Turtle()
T.hideturtle()
T.screen.colormode(255)
T.speed(0)
T.up()
T.pensize(2)
T.goto(random.randint(-length,length),random.randint(-length,length))
T.down()
for x in range(0,iterations):
T.color(random.randint(0,255),random.randint(0,255),random.randint(0,255))
T.goto(random.randint(-length,length),random.randint(-length,length))
drawer()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment