Turtle Blast

This lab was one of the hardest so far. I say this because it a new program that not many freshman would be familiar with, but once I found out the commands and understood the instructions I was to use what we learned and finish this lab later in the evening.

First of all, before starting the lab it is a good Idea to read the instructions. After reading the instructions, we realize there are several things we must do. First we must import the random and turtle modules. After importing these modules, we must assign a value to “turtle”. In this case I assigned “turtle” to be “wn”. Once we assigned it a value we are able to complete the next two steps. By using the .bgcolor and the .pencolor properties we are able to change the background to red and the pen color to white.

A window should pop up looking like this.

turtle blast 1

This is how your command line should look like

turtle blast 2

Next would be to assigning “wn” to turtle.Turtle(). Notice the empty parenthesis and the capital T they are important for your code to work. We are finally able to tell the turtle what do to.  We must make the turtle complete the following commands one-hundred times. We want the angle the turtle to move be random. Therefore, we command it to move at a random integer within 0 and45 degrees. We assign this command to angle. Then we tell it to move right at the angle  “angle”. We repeat this process for distance but we increase the range from 0 to 150.

After this your command line should look like this.

turtle blast 3

After completing this your red background window should look like this.

turtle blast 4