Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

turtle methods

Here is a nearly complete list of turtle methods. We have excluded the really dangerous ones that would require you to understand how Java draws stuff on displays. (Jython is written in Java).

The method names below are taken from the Java code that implements the JES media library. There are always an even number of words in parentheses in the pattern type/name, type/name. If there are two words in parentheses, the first is the TYPE of the variable and the second is a NAME for that formal parameter.

Some of the methods return a value. It should be obvious which (i.e. the "get..." and "is...." methods).

getDistance(int x, int y)
turnToFace(SimpleTurtle turtle)
turnToFace(int x, int y)
getPicture()
setPicture(Picture pict)
getShellColor()
setShellColor(Color color) 
getBodyColor()
setBodyColor(Color color)
setColor(Color color)
getWidth()
getHeight()
setWidth(int theWidth)
setHeight(int theHeight)
getXPos()
getYPos()
getPen()
setPen(Pen thePen)
setPenDown(boolean value)
penUp()
penDown()
getPenColor()
setPenColor(Color color)
setPenWidth(int width)
getPenWidth()
clearPath()
getHeading()
setHeading(double heading)
getName()
setName(String theName) 
isVisible()
hide()
show()
forward() # By 100 pixels
forward(int pixels)
backward()
backward(int pixels)
moveTo(int x, int y)
turnLeft() # by 90
turnRight()
turn(int degrees) 
drop(Picture dropPicture) 
toString() 


Links to this Page