Turtle Graphic

In this assignment, we had to create a form of a star with the use of turtle graphics. These were the direction given to us:

  • 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

This is how the coding appears to look when typing it on python:

capture-png-3

code

Here are the images of how this assignment turned out.

capture-png-4

first stage of development #1

capture

When Finished #2

When creating this star with the turtle module, it was pretty complicated. I had to review over and over on how to correctly import the right components for this program. Don’t get me wrong, its simple but only when you do multiple times over again. I was up to the point where I already memorized the format just because I had to do it again. That’s probably why  people encourage that idea of “practice makes perfect”!

By: Arnold Santana