---
author: izayak
title: "Ruotong's Function Turtle Exercise"
layout: post
---

<iframe src="https://trinket.io/embed/python/ec9fde7c73" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>  

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.  




Create Ruotong's Turtle Function Post
Create Ruotong's Turtle Function Post