Methods for Turtle objects

Here are the methods for Turtle objects you are most likely to need for this lab:

And here is a full listing of the methods for Turtle objects:


class Turtle(__builtin__.object)
|  Methods defined here:
|  
|  __init__(self, window)
|      Create a turtle in the specified Zelle graphics window.
|  
|  animate(self, flag)
|      Set the animation flag.
|      
|      Paramters: flag - True if animation should be on, False if not
|      Returns: None
|  
|  clearPolygon(self)
|      Reset the polygon being traced out by the turtle.
|      (See getPolygon() method).
|      
|      Paramters: None
|      Returns: The polygon that was just wiped out.
|  
|  getDistance(self)
|      Return the total distance (in pixels) that the turtle has
|      traveled in its lifetime.
|      
|      Paramters: n/a
|      Returns: The distance traveled by this turtle
|  
|  getPoint(self)
|      Return the Point representing the turtle's current location.
|      
|      Paramters: n/a
|      Returns: the Zelle graphics Point at the turtle's location.
|  
|  getPolygon(self)
|      Return the Zelle Polygon traced out by the turtle's path.
|      This polygon resets on a call to 'jump' or 'clearPolygon'.
|      
|      Parameters: n/a
|      Returns: the Polygon defined by the turtle's path (since it
|               last reset)
|  
|  go(self, distance)
|      Move turtle forward by the specified distance. If the pen
|      is down (by default it is) draw a line along the turtle's path.
|      If animation is turned on (by default it is) animate the turtle's
|      movement.
|      
|      Parameters: distance - how far forward to go in pixels, should be 
|                             an int or a float
|      Returns: None
|  
|  jump(self, p)
|      Immediately move the turtle to the specified Point in its Zelle
|      graphics window, without drawing the path followed. The polygon
|      being traced out by the turtle resets (see getPolygon() method).
|      
|      Paramters: p - Zelle graphics Point representing turtle's new 
|                     location
|      Returns: None
|  
|  penDown(self)
|      Put the turtle's 'pen' down. When the pen is down, lines
|      are drawn along the turtle's path.
|      
|      Parameters: n/a
|      Returns: None
|  
|  penUp(self)
|      Lift the turtle's 'pen' up. When the pen is up, lines
|      are not drawn along the turtle's path.
|      
|      Paramters: n/a 
|      Returns: None
|  
|  setColor(self, color)
|      Change color of the line drawn by the turtle's pen
|      
|      Parameters: color - a Zelle Graphics color
|      Returns: None
|  
|  setSpeed(self, speed)
|      Set speed at which turtle moves in animation.
|      
|      Paramters: speed - an integer between 1 and 10 where 1 is
|                         the slowest and 10 is the fastest
|      Returns: None
|  
|  setWidth(self, width)
|      Change the width of the line drawn by the turtle's pen
|      
|      Parameters: width - how wide the line should be (in pixels)
|      Returns: None
|  
|  tl(self, delA=90)
|      Alias for turnLeft/turn method
|  
|  tr(self, delA=90)
|      Alias for turnRight method
|  
|  turn(self, delA=90)
|      Turn turtle left by the specified number of degrees.
|      The default is 90 degrees.
|       
|      Paramters: delA - number of degrees to turn by, an int or float
|      Returns: None
|  
|  turnLeft(self, delA=90)
|      Turn turtle left by the specified number of degrees.
|      The default is 90 degrees. This is an alias for 'turn'.
|      
|      Parameters: delA - number of degrees to turn by, an int or float
|      Returns: None
|  
|  turnRight(self, delA=90)
|      Turn turtle right by the specified number of degrees.
|      The default is 90 degrees.
|      
|      Parameters: delA - number of degrees to turn by, an int or float
|      Returns: None
|  
|  undraw(self)
|      Undraw the visible portions of the turtle's journey.
|      
|      Paramters: n/a
|      Returns: None
|  
|  ----------------------------------------------------------------------