Lab Work # 3

Making A Turtle Blast
In this lab we were suppose to write a program to create an output screen that the professor had shown us. First we had to change the color of the window to red, and the turtle that we create must have a pen color of white. Then we had to make the turtle change its heading to the right with a random angle between 0 and 45 degrees. After that the turtle must move forward a distance of 0 to 150 pixels and then move the turtle backward the same distance. This process must be carried out 100 times in a loop. So using Python this is the code I entered.
import turtle
import random
window = turtle.Screen()
ayesha=turtle.Turtle()
window.bgcolor(“red”)
ayesha.color(“white”)
for i in range (100) :
ayesha.pensize=(2)
ayesha.right(random.randint (0, 45))
distance = random.randint (0, 150)
ayesha.forward (distance)
ayesha.backward(distance)

After I typed this code into python it gave me the picture that we were suppose to achieve which is shown below:

12087492_1053051651372311_884664056_n