Category Archives: Uncategorized

Lab 2 : Turtle Blast

Code:
import turtle
import random
wn = turtle.Screen()
sekh = turtle.Turtle()
wn.bgcolor(“red”)
sekh.color(“white”)

for i in range (100):
sekh.right(random.randint (0,45))
distance = random.randint (0,150)
sekh.forward (distance)
sekh.backward (distance)

Screenshot:

Turtle Heading with in angle 0 to 45

Turtle Heading with in angle 0 to 45