From ee0d306f016516a11b125cdb8fa6aacc5b70a245 Mon Sep 17 00:00:00 2001 From: derfliwj Date: Sun, 26 Nov 2017 22:24:55 -0500 Subject: [PATCH 1/6] I added my name --- src/m3_turtles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index df507f3..83a0479 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -10,7 +10,7 @@ -- ASSIGNING a VALUE to a NAME (VARIABLE). Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder, - their colleagues and PUT_YOUR_NAME_HERE. + their colleagues and Wesley Derflinger. """ ######################################################################## # From 444db75f7ef74a95202b207286a70eda4693ed32 Mon Sep 17 00:00:00 2001 From: derfliwj Date: Mon, 27 Nov 2017 14:26:47 -0500 Subject: [PATCH 2/6] TODO 1 to DONE 1 --- src/m2_hello_world.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..75ec806 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -13,7 +13,7 @@ ######################################################################## # -# TODO: 1. +# DONE: 1. # (Yes, that means for YOU to DO things per these instructions:) # # Run this module by right clicking anywhere in this window and select From 2ae5030c67519fe7f34f3d82829640cf2fb238cc Mon Sep 17 00:00:00 2001 From: derfliwj Date: Mon, 27 Nov 2017 14:35:34 -0500 Subject: [PATCH 3/6] TODO 2 to DONE 2 --- src/m2_hello_world.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index 75ec806..e416d92 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -26,7 +26,7 @@ ######################################################################## # -# TODO: 2. +# DONE: 2. # Notice the small horizontal BLUE bars on the scrollbar-like thing # on the right. Each blue bar indicates a TO DO in this module. # @@ -34,7 +34,7 @@ # by clicking on the blue bars. ** Try that now. ** # # b. When you have completed a TO DO, you should change the word -# TODO +# DONE # to # DONE. # Try it now on line 16 above, and note that its blue bar on @@ -51,8 +51,9 @@ ######################################################################## # -# TODO: 3. +# DONE: 3. # Add another print statement below. +print('My name is Wes.') # It should print any string that you want (but keep it G-rated!) # Test your code by re-running this module using either the right click # method again or by using the play button in the upper right. @@ -62,12 +63,13 @@ ######################################################################## # -# TODO: 4. +# DONE: 4. # Add yet another print statement. # This one should print the *product* of 3,607 and 34,227. # Let the computer do the arithmetic for you (no calculators!). # You do NOT have to use strings for this, so no quotation marks! # +print(3607*34227) # TEST your code by re-running this module, then asking someone # whom you trust: What number did your print display for TO DO 4? # (HINT: It is an INTERESTING number.) Get help if your value is wrong. @@ -76,7 +78,7 @@ ######################################################################## # -# TODO: 5. +# DONE: 5. # Look at the list of files in this project to the left. # Note that this file (m2_hello_world.py) is now displayed in a blue # font color (if the file is highlighted select a different file so yu can From e5ffea08e18675f206ceaa735dd068638cc21460 Mon Sep 17 00:00:00 2001 From: derfliwj Date: Mon, 27 Nov 2017 15:00:13 -0500 Subject: [PATCH 4/6] DONE --- src/m3_turtles.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index 83a0479..bf3570d 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -14,7 +14,7 @@ """ ######################################################################## # -# TODO: 1. +# DONE: 1. # (Yes, that means for YOU to DO things per these instructions:) # # On Line 13 above, replace PUT_YOUR_OWN_NAME_HERE with your OWN name. @@ -29,7 +29,7 @@ ######################################################################## # -# TODO: 2. +# DONE: 2. # Allow this file to use the rosegraphics.py file by marking the src # directory as a "Sources Root". Do that by right clicking on the src folder, # then selector Mark Directory As --> Sources Root @@ -74,10 +74,14 @@ matt.left(90) matt.forward(50) - +matt.backward(50) +matt.forward(50) +matt.left(90) +matt.right(45) +matt.forward(50) ######################################################################## # -# TODO: 3. +# DONE: 3. # Add a few more line of your own code above to make one of the # existing Turtles move some more and/or have different # characteristics. @@ -91,7 +95,7 @@ ######################################################################## # -# TODO: 4. +# DONE: 4. # The code above CONSTRUCTS two SimpleTurtle objects and gives those objects NAMES: # dave matt # @@ -108,11 +112,20 @@ # # As always, test by running the module. # + +wes = rg.SimpleTurtle('turtle') +wes.pen = rg.Pen('green', 30) +wes.speed = 1 +wes.forward(90) +wes.backward(50) +wes.left(100) +wes.forward(150) + ######################################################################## ######################################################################## # -# TODO: 5. +# DONE: 5. # Run one more time to be sure that all is still OK. # Ensure that no blue bars on the scrollbar-thing to the right remain. # From 06a8e8cec29e34a1157cf3be6df0842c4e70c9a2 Mon Sep 17 00:00:00 2001 From: derfliwj Date: Mon, 27 Nov 2017 15:01:12 -0500 Subject: [PATCH 5/6] DONE --- src/m3_turtles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index bf3570d..04a4e94 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -120,7 +120,7 @@ wes.backward(50) wes.left(100) wes.forward(150) - +wes.backward(300) ######################################################################## ######################################################################## From 291719b4bfb2f7284d9d840714d9a49f1a67eb34 Mon Sep 17 00:00:00 2001 From: derfliwj Date: Mon, 27 Nov 2017 15:21:04 -0500 Subject: [PATCH 6/6] DONE --- src/m5_your_turtles.py | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..47cb26d 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -2,15 +2,15 @@ Your chance to explore Loops and Turtles! Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder, - their colleagues and PUT_YOUR_NAME_HERE. + their colleagues and Wesley Derflinger. """ ######################################################################## -# TODO: 1. +# DONE: 1. # On Line 5 above, replace PUT_YOUR_NAME_HERE with your own name. ######################################################################## ######################################################################## -# TODO: 2. +# DONE: 2. # # You should have RUN the PREVIOUS module and READ its code. # (Do so now if you have not already done so.) @@ -27,4 +27,39 @@ # fixing them at either this session OR at the NEXT session. # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. + +import rosegraphics as rg + +window = rg.TurtleWindow() + +green_turtle = rg.SimpleTurtle('turtle') +green_turtle.pen = rg.Pen('green', 3) +green_turtle.speed = 1 + +wes_turtle = rg.SimpleTurtle('turtle') +wes_turtle.pen = rg.Pen('orange', 5) +wes_turtle.speed = 5 + +size_1 = 300 +size_2 = 150 + +for k in range(5): + + green_turtle.draw_square(size_1) + wes_turtle.draw_square(size_2) + green_turtle.pen_up() + wes_turtle.pen_up() + green_turtle.backward(45) + wes_turtle.forward(45) + green_turtle.forward(10) + wes_turtle.backward(10) + green_turtle.left(45) + wes_turtle.right(45) + green_turtle.pen_down() + wes_turtle.pen_down() + size_1 = size_1 - 12 + size_2 = size_2 - 5 + + +window.close_on_mouse_click() ########################################################################