For this lab, we had to use the program python turtle which allowed us to move a “turtle” in different ways that creates an output. The following were the instructions of the turtle given to me by my professor:

  • Change the color of the window to “red” using wn.bgcolor property of the screen variable you create.
  • Your turtle variable has to have a pen color “white”, you have to use the .pencolor property of your turtle variable.
  • You have to make your turtle to change its heading to the right with an random angle between 0 and 45 degrees.
  • Move your turtle forward a random distance between 0 and 150 pixels.
  • Then move the turtle backward the same distance than above
  • Repeat the last three steps 100 times

With those instructions I was able to create the turtle and I did have fun doing it. At first it was difficult but once I started to read the textbook that teaches me on the basics of how to create a turtle, the more I started to understand. This was a great experience to see the turtle move back and forth and make a cool looking figure.

Screenshot(s) of my script and of the turtle:

turtle-1capture-2