Turtle Blast

In this lab, we were introduced the basic codes in chapter 4 of our reading that is used to navigate the turtle we imported. Along with importing the turtle I would import the random module so I can be able to generate random values for the movements later on in the code.  Instructions  for the lab told me to create a background in the color red.  I named my turtle “michael” and set it to color white. It was asked that I would create a loop that goes 100 times so i used “for i in range(100):”. At first I had trouble withing my program because the turtle would go all over the place. But I figured it out by assigning “move” to randomize its value and placing that assigned statement with the forward and backward statements. In doing so, I was able to get the turtle to move forward and backward with the same random values due to it being assigned the same statement.

 

turtleblast

 

turtle