For this lab we get introduced to the python turtle which is a program that moves a “turtle” to a certain distance and angle .We are instructed to :
- Change the color of the window to “red” using he .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. ( I used .color) - 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 code that I wrote :
This is the result I got from running my code :