"""File: draw_square.py Purpose: Use the TurtleWorld module in Swampy to draw a square Run: python draw_square.py Input: None, except to terminate the program, click X to close the window Output: A window with a square in it Note: This is a solution to Exercise 4.3.1 in Python for Software Design """ from TurtleWorld import * def draw_sqr(t): # Parameter is a turtle """Draw a square using the Turtle t """ for i in range(4): fd(t, 100) lt(t) world = TurtleWorld() # Create an instance of TurtleWorld -- i.e, a window bob = Turtle() # Create an instance of a Turtle print bob draw_sqr(bob) wait_for_user()