From 2bd5ab28e3ccd3994b47f9693a99804931dba9b6 Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:17:07 -0500 Subject: [PATCH 1/9] I added my name, as it asked. --- 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..b09daab 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 Matthew De Clerck. """ ######################################################################## # From 6687b4ecc77816f0b4931a0005fe1a3d3957b0f9 Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:36:58 -0500 Subject: [PATCH 2/9] I added my name, as it asked. --- src/m2_hello_world.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..0688e13 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 @@ -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,7 +51,7 @@ ######################################################################## # -# TODO: 3. +# Done: 3. # Add another print statement below. # 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 @@ -59,10 +59,10 @@ # Look at the Console to be sure that your string printed as expected. # ######################################################################## - +print('Hi there') ######################################################################## # -# 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!). @@ -73,10 +73,10 @@ # (HINT: It is an INTERESTING number.) Get help if your value is wrong. # ######################################################################## - +print(3607*34227) ######################################################################## # -# 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 300e9426a6182cb1ae0737de60bf520b03b3bc5e Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:37:26 -0500 Subject: [PATCH 3/9] I added my name, as it asked. --- 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 0688e13..e42b1cc 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -76,7 +76,7 @@ print(3607*34227) ######################################################################## # -# Done: 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 d6bcd85b18803332848e206800e97fa1b738fadf Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:38:40 -0500 Subject: [PATCH 4/9] I completed m2 --- 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 e42b1cc..0688e13 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -76,7 +76,7 @@ print(3607*34227) ######################################################################## # -# DONE: 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 df78a713c46eacf4fc402b9571f3f6127c84b5eb Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:39:01 -0500 Subject: [PATCH 5/9] I completed m2 --- 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 0688e13..e42b1cc 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -76,7 +76,7 @@ print(3607*34227) ######################################################################## # -# Done: 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 0b3625fb91c1cc83c30e9d1441bb7c4c7bfe3d4d Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:40:43 -0500 Subject: [PATCH 6/9] I completed m2 --- 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 e42b1cc..0688e13 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -76,7 +76,7 @@ print(3607*34227) ######################################################################## # -# DONE: 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 f1e7a7ccbeee7e386ced163b6706a16d08aab79f Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:52:56 -0500 Subject: [PATCH 7/9] I completed m2 --- src/m3_turtles.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index b09daab..2d1ee02 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 @@ -63,6 +63,9 @@ dave.forward(100) dave.left(90) dave.forward(200) +dave.right(300) +dave.forward(50) +dave.backward(500) # ---------------------------------------------------------------------- # Construct a new turtle and ask it to do things. @@ -73,11 +76,13 @@ matt.backward(50) matt.left(90) matt.forward(50) +matt.backward(400) +matt.right(200) ######################################################################## # -# 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 +96,7 @@ ######################################################################## # -# TODO: 4. +# Done: 4. # The code above CONSTRUCTS two SimpleTurtle objects and gives those objects NAMES: # dave matt # @@ -109,10 +114,18 @@ # As always, test by running the module. # ######################################################################## +shang = rg.SimpleTurtle('turtle') +shang.speed = 20 # Faster +shang.forward(200) +shang.left(100) +shang.forward(100) +shang.right(50) +shang.backward(300) +shang.right(200) ######################################################################## # -# 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 8f793b87e5688a0a0687a3e6646d47205f5c2b2a Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 14:53:27 -0500 Subject: [PATCH 8/9] I completed m3 --- 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 2d1ee02..c3153d5 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -125,7 +125,7 @@ ######################################################################## # -# Done: 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 526cb91b9ed3fff64ed3d01d08b869fff2552bf9 Mon Sep 17 00:00:00 2001 From: declermr Date: Wed, 29 Nov 2017 15:18:04 -0500 Subject: [PATCH 9/9] I completed m5 --- src/m5_your_turtles.py | 50 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..2428ec7 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 Matthew De Clerck. """ ######################################################################## -# 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,47 @@ # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. ######################################################################## +import rosegraphics as rg + +window = rg.TurtleWindow() + +john = rg.SimpleTurtle('turtle') +john.pen = rg.Pen('cyan', 10) +john.speed = 10 + +for k in range(10): + john.pen_down() + john.forward(30) + john.left(10) + john.right(70) + john.pen_up() + john.backward(50) + john.pen_up() + john.left(20) + john.pen_up() + +john.pen = rg.Pen('blue', 5) + +for k in range(12): + john.pen_down() + john.forward(30) + john.left(10) + john.right(70) + john.pen_up() + john.backward(50) + john.pen_up() + john.left(30) + john.pen_up() + +john.pen = rg.Pen('green', 3) + +for k in range(20): + john.pen_down() + john.forward(30) + john.left(10) + john.right(70) + john.pen_up() + john.backward(50) + john.pen_up() + john.left(40) + john.pen_up() \ No newline at end of file