Summary – In this lab we examined and learned about the turtle functions in Python programming.
The Code
import turtle
import random
wn = turtle.Screen()
wn.bgcolor(‘red’)
tess = turtle.Turtle()
tess.color (‘white’)
tess.pensize(1)
for i in range(100):
angle = random.randint(0,45)
tess.right(angle)
distance = random.randint(0,150)
tess.forward(distance)
tess.backward(distance)