Lab 2

import turtle
import random

wn = turtle.Screen()
alex = turtle.Turtle()

wn.bgcolor("red")
alex.color("white")
alex.speed(0)

for num in range(100):
    n = random.randint (0,150) #distance, forward & back
    w = random.randint (0,45) #degrees, right
    alex.fd(n)
    alex.fd(-n)
    alex.rt(w)

Screen Shot 2013-10-04 at 8.21.08 PM

Leave a Reply

Your email address will not be published. Required fields are marked *