"""File: draw_triangle.py Purpose: Use the TurtleWorld module in Swampy to draw a triangle. Run: python draw_triangle.py Input: None, except to terminate the program, click X to close the window Output: A window with a square in it """ from TurtleWorld import * def draw_tri(t, leng): """Draw a triangle with sides having length leng using the Turtle t """ for i in range(3): fd(t, leng) lt(t, 120) world = TurtleWorld() # Create an instance of TurtleWorld -- i.e, a window bob = Turtle() # Create an instance of a Turtle print bob leng = int(raw_input("How long should the triangle's sides be?\n ")) draw_tri(bob, leng) wait_for_user()