From 36450e954fda162c4fd01357290e6cce942fa77e Mon Sep 17 00:00:00 2001 From: royjm Date: Tue, 5 Jun 2018 19:10:29 -0400 Subject: [PATCH 1/3] did it --- src/m2_hello_world.py | 2 +- src/m3_turtles.py | 4 ++-- src/m5_your_turtles.py | 43 +++++++++++++++++++++++++++++++++++++++--- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..8beca89 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 diff --git a/src/m3_turtles.py b/src/m3_turtles.py index df507f3..b6309f3 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -10,11 +10,11 @@ -- 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 Jeremy Roy. """ ######################################################################## # -# 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. diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..f906f04 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 Jeremy Roy. """ ######################################################################## -# 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.) @@ -28,3 +28,40 @@ # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. ######################################################################## + +import rosegraphics as rg + +window = rg.TurtleWindow() + +jeff = rg.SimpleTurtle("turtle") +jeff.pen = rg.Pen('green', 5) +jeff.speed = 10 + +size = 420 + +for k in range(13): + jeff.draw_circle(size) + jeff.pen_up() + jeff.forward(15) + jeff.right(29) + jeff.pen_down() + + size = size - 69 + +greg = rg.SimpleTurtle() +greg.pen = rg.Pen('red', 10) +greg.speed = 6 + +size = 341 + +for k in range(17): + greg.draw_square(size) + greg.pen_up() + greg.forward(19) + greg.right(23) + greg.pen_down() + + size = size - 65 + + + From 867ed800487c0430f6f9841fffc0c47d96437d0d Mon Sep 17 00:00:00 2001 From: royjm Date: Tue, 5 Jun 2018 19:28:03 -0400 Subject: [PATCH 2/3] did it --- src/m3_turtles.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index b6309f3..56526a2 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -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 @@ -77,7 +77,7 @@ ######################################################################## # -# 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. @@ -88,10 +88,11 @@ # As always, test by running the module. # ######################################################################## - +matt.pen = rg.Pen('blue', 20) +matt.draw_regular_polygon(7, 65) ######################################################################## # -# TODO: 4. +# Done: 4. # The code above CONSTRUCTS two SimpleTurtle objects and gives those objects NAMES: # dave matt # @@ -109,7 +110,16 @@ # As always, test by running the module. # ######################################################################## +chris = rg.SimpleTurtle('turtle') +chris.pen = rg.Pen('yellow', 7) +chris.speed = 11 +chris.draw_regular_polygon(9, 50) +sam = rg.SimpleTurtle() +sam.pen = rg.Pen('green', 10) +sam.speed = 7 +sam.forward(150) +sam.draw_regular_polygon(6, 75) ######################################################################## # # TODO: 5. From 2fe1a132546a8cb229fd4b59ba25ba8717c6be2b Mon Sep 17 00:00:00 2001 From: royjm Date: Tue, 5 Jun 2018 19:28:40 -0400 Subject: [PATCH 3/3] did it --- 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 56526a2..13ce215 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -122,7 +122,7 @@ sam.draw_regular_polygon(6, 75) ######################################################################## # -# 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. #