From 4750df148801d73f89d5393ac1df07cb73afac86 Mon Sep 17 00:00:00 2001 From: wur Date: Wed, 3 Jun 2020 22:14:54 -0400 Subject: [PATCH 1/4] progress --- src/m1e_comments_strings_print.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/m1e_comments_strings_print.py b/src/m1e_comments_strings_print.py index 18eb8a0..eb0db7b 100644 --- a/src/m1e_comments_strings_print.py +++ b/src/m1e_comments_strings_print.py @@ -14,3 +14,4 @@ print('one', 'two', 'buckle my shoe') print(3 + 9) print('3 + 9', 'versus', 3 + 9) + From 03a64c8ba078c581b3938a6bc82b0679ddd2ee74 Mon Sep 17 00:00:00 2001 From: wur Date: Thu, 4 Jun 2020 15:59:49 -0400 Subject: [PATCH 2/4] 10 --- src/m2_hello_world.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..72a12fc 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. # @@ -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 @@ -60,9 +60,11 @@ # ######################################################################## +print('Welcome') + ######################################################################## # -# 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!). @@ -74,9 +76,11 @@ # ######################################################################## +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 c7c2badcfb0305ab73b56e732edc58fcb5be57c2 Mon Sep 17 00:00:00 2001 From: wur Date: Thu, 4 Jun 2020 16:29:48 -0400 Subject: [PATCH 3/4] 10 --- src/m3_turtles.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index df507f3..ebf358c 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 Rubing Wu. """ ######################################################################## # -# 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 @@ -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. @@ -89,6 +89,9 @@ # ######################################################################## +matt.left(90) +matt.forward(50) + ######################################################################## # # TODO: 4. @@ -110,9 +113,16 @@ # ######################################################################## +bruce = rg.SimpleTurtle('turtle') +bruce.pen = rg.Pen('blue', 20) +bruce.speed = 8 +bruce.left(90) +bruce.forward(50) + + ######################################################################## # -# 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 d9d836423ad646f6436363aba3e4a169c65a748a Mon Sep 17 00:00:00 2001 From: wur Date: Thu, 4 Jun 2020 16:37:38 -0400 Subject: [PATCH 4/4] 10 --- src/m4e_loopy_turtles.py | 2 +- src/m5_your_turtles.py | 41 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/m4e_loopy_turtles.py b/src/m4e_loopy_turtles.py index 168df44..51e9ed3 100644 --- a/src/m4e_loopy_turtles.py +++ b/src/m4e_loopy_turtles.py @@ -50,7 +50,7 @@ blue_turtle = rg.SimpleTurtle('turtle') blue_turtle.pen = rg.Pen('midnight blue', 3) -blue_turtle.speed = 10 # Fast +blue_turtle.speed = 2 # Fast # The first square will be 300 x 300 pixels: size = 300 diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..6eb0d86 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 Rubing Wu. """ ######################################################################## -# 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,38 @@ # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. ######################################################################## + +import rosegraphics as rg + +window = rg.TurtleWindow() + +Teemo = rg.SimpleTurtle('turtle') +Teemo.pen = rg.Pen('Orange', 5) +Teemo.speed = 1 + +Yasuo = rg.SimpleTurtle('turtle') +Yasuo.pen = rg.Pen('blue', 5) +Yasuo.speed = 2 + +size = 150 + +for k in range (10): + + Teemo.draw_square(size) + Yasuo.draw_square(size) + + Teemo.pen_up() + Teemo.left(10) # degree angle + Teemo.forward(45) + Teemo.right(45) # degree angle + Teemo.pen_down() + + Yasuo.pen_up() + Yasuo.left(10) + Yasuo.forward(45) + Yasuo.right(45) + Yasuo.pen_down() + + size = size - 12 + +window.close_on_mouse_click() \ No newline at end of file