A City Tech OpenLab ePortfolio

Lab 02 Turtle Blast

Lab Description:

Make random lines from the center of a screen!

Code:

import turtle

import random

wn = turtle.Screen()
wn.bgcolor(“red”)

Tess = turtle.Turtle()
Tess.pencolor(“white”)
Tess.pensize(2)

for i in range(100):
a = random.randint(0,45)
b = random.randint(0,150)
Tess.right(a)
Tess.forward(b)
Tess.backward(b)

 

Screenshots:

 

turtule blast