"""File: draw_square2.py Purpose: Use the TurtleWorld module in Swampy to draw a square. This version will draw a square with any side length Run: python draw_square2.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_sqr(t, leng): """Draw a square with sides having length leng using the Turtle t """ for i in range(4): fd(t, leng) lt(t) 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 square's sides be?\n ")) draw_sqr(bob, leng) wait_for_user()