Ruotong's Function Turtle Exercise

by Ruotong Yang

28 Jan 2016

Through this exercise, I improved my understanding of while loop a lot. I use three while loops in this program, in order to deal with
1) bad input of coordinates;
2) bad input of shape; 3) when to stop the drawing. I also practiced random and math modules and they are very useful.
For the two functions ‘draw’ and ‘goto’, ‘draw’ has a return value and both of them take arguments.
I wrote a new program as my previous ones are not convenient to improve as the way it makes a circle and the fact that it has to
figure out where to draw the eyes.

Ruotong Yang is a master student in STOR department at UNC Chapel Hill. Find Ruotong Yang on Twitter, Github, and on the web.