From 6afdee9335df777fb2350bc118b58cfe0e206e34 Mon Sep 17 00:00:00 2001 From: dougheea Date: Sat, 25 Nov 2017 17:08:04 -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..4c4c279 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 Emily Dougherty. """ ######################################################################## # From e441d7d10df11e4c44c0228ae2ac90fafe2d7ce1 Mon Sep 17 00:00:00 2001 From: dougheea Date: Mon, 27 Nov 2017 16:04:35 -0500 Subject: [PATCH 2/6] done --- src/m2_hello_world.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..ce21ad8 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, Bri!") ######################################################################## # -# 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,6 +73,7 @@ # (HINT: It is an INTERESTING number.) Get help if your value is wrong. # ######################################################################## +print(12345 * 12345) ######################################################################## # From 6c94cfe390f653117e236827508104e12553848d Mon Sep 17 00:00:00 2001 From: dougheea Date: Mon, 27 Nov 2017 16:16:43 -0500 Subject: [PATCH 3/6] done --- src/m3_turtles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index 4c4c279..78445a6 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 From 6da068cb656596d060c05509867402e67d84e93e Mon Sep 17 00:00:00 2001 From: dougheea Date: Mon, 27 Nov 2017 16:20:21 -0500 Subject: [PATCH 4/6] done --- src/m1e_comments_strings_print.py | 2 ++ src/m2_hello_world.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/m1e_comments_strings_print.py b/src/m1e_comments_strings_print.py index 18eb8a0..12bdefb 100644 --- a/src/m1e_comments_strings_print.py +++ b/src/m1e_comments_strings_print.py @@ -14,3 +14,5 @@ print('one', 'two', 'buckle my shoe') print(3 + 9) print('3 + 9', 'versus', 3 + 9) +print('I like musicals') +print(9 + 8) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index ce21ad8..60a1b27 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -73,11 +73,11 @@ # (HINT: It is an INTERESTING number.) Get help if your value is wrong. # ######################################################################## -print(12345 * 12345) +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 9604236f6603acdbe95d348d369325f4efc8d070 Mon Sep 17 00:00:00 2001 From: dougheea Date: Mon, 27 Nov 2017 16:32:46 -0500 Subject: [PATCH 5/6] done --- src/m3_turtles.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index 78445a6..46ad0a3 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -73,11 +73,14 @@ matt.backward(50) matt.left(90) matt.forward(50) - +matt.pen = rg.Pen('blue', 15) +matt.speed = 5 # slower +matt.right(90) +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 +94,7 @@ ######################################################################## # -# TODO: 4. +# DONE: 4. # The code above CONSTRUCTS two SimpleTurtle objects and gives those objects NAMES: # dave matt # @@ -109,10 +112,14 @@ # As always, test by running the module. # ######################################################################## - +steve = rg.SimpleTurtle('turtle') +steve.speed = 2 # Steve is a slow turtle +steve.forward(30) +steve.left(45) +steve.forward(40) ######################################################################## # -# 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 65650d8470ca61cf5045a62dbb233b25ae5e6e8d Mon Sep 17 00:00:00 2001 From: dougheea Date: Mon, 27 Nov 2017 17:05:17 -0500 Subject: [PATCH 6/6] done, finished the turtles --- src/m5_your_turtles.py | 44 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..0dae3e5 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 Emily Dougherty. """ ######################################################################## -# 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,41 @@ # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. ######################################################################## +import rosegraphics as rg + +window = rg.TurtleWindow() + +Elle = rg.SimpleTurtle('turtle') +Elle.pen = rg.Pen('pink', 2) +Elle.speed = 20 + +size1 = 300 + +Emmett = rg.SimpleTurtle('turtle') +Emmett.speed = 15 + +size2 = 15 + +for k in range(8): + Elle.draw_square(size1) + + Elle.pen_up() + Elle.right(45) + Elle.forward(15) + Elle.left(45) + + Elle.pen_down() + size1 = (size1 - 15) + +for a in range(8): + Emmett.draw_circle(size2) + + Emmett.pen_up() + Emmett.left(60) + Emmett.forward(15) + Emmett.right(60) + + Emmett.pen_down() + size2 = (size2 + 15) + +window.close_on_mouse_click()