Lab#3-Turtle Blast

Introduction:
For the purpose of this lab Students are required to create a code using turtle
graphics. Turtle graphics allows students to draw shapes and pictures in a
white page by typing out codes that indicate angle,degree,color etc. For this
lab called “turtle blast” i will be writing a code that shows a blast of lines
that goes back and forward to the center of the screen

Code:
in order to code the “turtle blast” I have to follow certain rules and
procedures so my code works properly. As shown in image#1 below, the first 7 lines
of my code are the basis of my code. They display the color of the background, pen color, pen size, and imports such as turtle and random which allows the code to work properly. As required by the lab instructions, for this lab my background would be displayed red and my lines will be white.In addition the “import random” code the length and angle of my lines at random value. The second part of my code shows how the program will look like, the picture. I used a loop for my code to make my code shorter as I am required to repeat my code 100 times, so i used the code “for x in range(100):” to shorten the procedure. The rest of my code is just how the lines world be draw out. The angle and distance of my lines are both in random from 0 to 45 and 0 to 100. I run the code and the image # 2 below show the the visual representation of my code.

Image#1

Blast code

Image#2

Turtle blast