turtleworldtest - bob = Turtle() # create a turtle, and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# Turtle1.py P. Conrad for CS5NM, 10/17/2008, UCSB # Code from Think Python, by Allen B. Downey, Chapter 4 # Basics of TurtleWorld graphics import sys sys.path.append("/Users/Genius/Documents/CS5NM/swampy.1.1") # change this if needed from TurtleWorld import * world = TurtleWorld() # create a world (a screen)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bob = Turtle() # create a turtle, and call him bob print bob # print some stuff about bob in the Python Shell window fd(bob, 100) # move forward 100 pixels rt(bob) # turn right fd(bob, 100) # more forward 100 pixels wait_for_user() # keep the screen open til we click the red X or circle to quit...
View Full Document

This note was uploaded on 08/28/2009 for the course CS 50 taught by Professor Staff during the Spring '08 term at UCSB.

Ask a homework question - tutors are online