""" An exercise that summarizes what you have learned in this Session. Authors: David Mutchler, Rachel Krohn, Dave Henthorn, Scott McClellan, Yiji Zhang, Mark Hays, Vibha Alangar, Matt Boutell, Dave Fisher, Sriram Mohan, Amanda Stouder, Mohammed Noureddine, Steve Chenoweth, Valerie Galluzzi, Curt Clifton, their colleagues and PUT_YOUR_NAME(S)_HERE. """ ############################################################################### # TODO: 1. # On Line 7 above, replace PUT_YOUR_NAME(S)_HERE with your own name(s). ############################################################################### ############################################################################### # TODO: 2. # Write code that accomplishes the following (and ONLY the following): # _ # a. Imports rosegraphics as rg. # b. Constructs a TurtleWindow. # c. Constructs a SimpleTurtle with a "blue", thickness 1 Pen. # d. Constructs a SimpleTurtle with shape "turtle" # and a "red", thickness 5 Pen. # e. Makes the SimpleTurtle with a "blue" Pen: # 1. Go straight UP 200 pixels. # 2. Lift its pen UP # (so that the next movements do NOT leave a "trail"). # HINT: Use the "dot trick" to figure out how to do this. # 3. Go to the Point whose: # -- x-coordinate is 35 times the sine of 0.75 (radians) # -- y-coordinate is 4 raised to the math.pi power # HINT: Use the "dot trick" to figure out how to go to a Point. # 4. Put its pen DOWN # (so that the next movements will return to leaving a "trail"). # 5. Change its Pen's color to "green" and thickness 20. # 6. Go down and to the left at a 45 degree angle, for 150 pixels. # f. Makes the SimpleTurtle with a "red" Pen, with shape "turtle": # 1. Go 50 times the cosine of 0.3 (radians) pixels straight to the LEFT. # 2. Then go 150 pixels straight UP. # g. Makes the SimpleTurtle with a Pen that was "blue" but is now "green": # 1. Continue forward (in the same direction that it has been going) # 75 more pixels. # h. Asks your TurtleWindow to wait for a mouse click. # _ # See the turtles.pdf file for what the final result should look like. # _ # Don't forget to: # - Import rosegraphics # - Construct a TurtleWindow # [remember the required PARENTHESES for constructing an object!] # at the BEGINNING of your code. # - Ask your TurtleWindow to close_on_mouse_click # as the LAST line of your code. (Again, parentheses needed!) # See the beginning and end of m7e_loopy_turtles for an example. # _ # As always, test by running the module. ############################################################################### ############################################################################### # TODO: 3. After you have successfully written and tested code per the above # (get help as needed!), be sure that you understand how to: # -- CONSTRUCT an INSTANCE of a CLASS (we call such instances OBJECTS). # -- Make an object ** DO ** something by using a METHOD. # -- Reference an object's ** DATA ** by using an INSTANCE VARIABLE. # _ # If those concepts are not clear to you, ASK FOR HELP. # Once you understand those concepts, change the above _TODO_ to DONE. # _ # As always, COMMIT-and-PUSH when you are done with this module. ###############################################################################