From 24032944e32f5614a295b0a60ebbfb1561a41774 Mon Sep 17 00:00:00 2001 From: niruien Date: Sun, 26 Nov 2017 17:47:52 -0500 Subject: [PATCH 01/13] 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..5d0fb98 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -17,7 +17,7 @@ # TODO: 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. +# On Line 13 above, replace REBECCA with your OWN name. # # BTW, the top block of text above forms what is called a DOC-STRING. # It documents what this module does, in a way that exterior programs From 5d39c41f4d33effea948351004601ff915fc1091 Mon Sep 17 00:00:00 2001 From: niruien Date: Sun, 26 Nov 2017 17:49:54 -0500 Subject: [PATCH 02/13] 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 5d0fb98..0915728 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -17,7 +17,7 @@ # TODO: 1. # (Yes, that means for YOU to DO things per these instructions:) # -# On Line 13 above, replace REBECCA with your OWN name. +# On Line 13 above, replace RUIEN NI with your OWN name. # # BTW, the top block of text above forms what is called a DOC-STRING. # It documents what this module does, in a way that exterior programs From 8066da17c92418498ae4e314fb4922d5a220962c Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 14:36:25 -0500 Subject: [PATCH 03/13] added my name --- src/m2_hello_world.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..41168c9 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -13,7 +13,7 @@ ######################################################################## # -# TODO: 1. +# DONE # (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 # 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 # 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('Peppa Pig') ######################################################################## # -# TODO: 4. +# DONE # 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,7 +73,7 @@ # (HINT: It is an INTERESTING number.) Get help if your value is wrong. # ######################################################################## - +print(3607*34227) ######################################################################## # # TODO: 5. From 96b11eb8e1c7ebfa68754ee96ce470cc850e51dd Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 14:37:14 -0500 Subject: [PATCH 04/13] added my name --- 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 41168c9..1f09cbf 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -76,7 +76,7 @@ print(3607*34227) ######################################################################## # -# TODO: 5. +# DONE # 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 f3d71a098aadc79f7c0cd24d59fe8a9397c2d222 Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 14:37:46 -0500 Subject: [PATCH 05/13] added my name --- 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 1f09cbf..c1a7f98 100644 --- a/src/m2_hello_world.py +++ b/src/m2_hello_world.py @@ -59,7 +59,7 @@ # Look at the Console to be sure that your string printed as expected. # ######################################################################## -print('Peppa Pig') +print('Hi Rebecca') ######################################################################## # # DONE From 770e912197b05c5b8ad8c19ad4a0879d1e61d9ca Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 14:58:24 -0500 Subject: [PATCH 06/13] added my name --- src/m3_turtles.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index 0915728..d9e341e 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 Ruien Ni. """ ######################################################################## # -# TODO: 1. +# DONE # (Yes, that means for YOU to DO things per these instructions:) # # On Line 13 above, replace RUIEN NI with your OWN name. @@ -29,7 +29,7 @@ ######################################################################## # -# TODO: 2. +# DONE # 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,12 +63,13 @@ dave.forward(100) dave.left(90) dave.forward(200) - +dave.left(90) +dave.forward(100) # ---------------------------------------------------------------------- # Construct a new turtle and ask it to do things. # ---------------------------------------------------------------------- matt = rg.SimpleTurtle('turtle') -matt.pen = rg.Pen('red', 30) +matt.pen = rg.Pen('red', 80) matt.speed = 10 # Faster matt.backward(50) matt.left(90) @@ -77,7 +78,7 @@ ######################################################################## # -# TODO: 3. +# DONE # 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. @@ -109,10 +110,15 @@ # As always, test by running the module. # ######################################################################## - +mike = rg.SimpleTurtle('turtle') +mike.pen = rg.Pen('green',50) +mike.forward(100) +mike.left(90) +mike.forward(150) +mike.left(70) +mike.forward(100) ######################################################################## -# -# TODO: 5. +# DONE # 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 91bc2acc1616d8de3ecd42af816f68c3efdc11f3 Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 14:59:32 -0500 Subject: [PATCH 07/13] turtle --- src/m3_turtles.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index d9e341e..9fa6c70 100644 --- a/src/m3_turtles.py +++ b/src/m3_turtles.py @@ -112,6 +112,7 @@ ######################################################################## mike = rg.SimpleTurtle('turtle') mike.pen = rg.Pen('green',50) +mike.speed = 15 mike.forward(100) mike.left(90) mike.forward(150) From f34802a6f5c67989cf34c3ee75688a853c4c56fc Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 15:20:16 -0500 Subject: [PATCH 08/13] mike --- src/m5_your_turtles.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..9c6d942 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -2,10 +2,10 @@ 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 Ruien Ni """ ######################################################################## -# TODO: 1. +# DONE # On Line 5 above, replace PUT_YOUR_NAME_HERE with your own name. ######################################################################## @@ -28,3 +28,19 @@ # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. ######################################################################## +import rosegraphics as rg +window = rg.TurtleWindow() +mike = rg.SimpleTurtle('turtle') +mike.pen = rg.Pen('green', 50) +mike.speed = 10 +size =100 +for k in range(20): + mike.draw_circle(20) + mike.pen_up() + mike.right(45) + + + + + + From 35ac66a8837d256c5a3581a26dfeae9373ff2f5b Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 16:42:53 -0500 Subject: [PATCH 09/13] mike --- src/m5_your_turtles.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index 9c6d942..9cdd5f9 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -31,16 +31,23 @@ import rosegraphics as rg window = rg.TurtleWindow() mike = rg.SimpleTurtle('turtle') -mike.pen = rg.Pen('green', 50) +mike.pen = rg.Pen('green', 10) mike.speed = 10 -size =100 +size =200 for k in range(20): - mike.draw_circle(20) + mike.draw_circle(size) mike.pen_up() mike.right(45) + mike.right(30) + mike.pen_down() + size = size-10 + + + + From 41857f58d43310e274486e3d4098090502d64508 Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 16:50:34 -0500 Subject: [PATCH 10/13] mike and rebecca --- src/m5_your_turtles.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index 9cdd5f9..1200d12 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -32,16 +32,30 @@ window = rg.TurtleWindow() mike = rg.SimpleTurtle('turtle') mike.pen = rg.Pen('green', 10) -mike.speed = 10 -size =200 -for k in range(20): +mike.speed = 5 +size = 150 +for k in range(10): mike.draw_circle(size) mike.pen_up() mike.right(45) mike.right(30) mike.pen_down() size = size-10 - + +rebecca = rg.SimpleTurtle('turtle') +rebecca.pen = rg.Pen('pink',10) +rebecca.speed = 5 +length = 200 +for j in range (15): + rebecca.draw_square(length) + rebecca.pen_up() + rebecca.left(45) + rebecca.forward(10) + rebecca.left(45) + rebecca.pen_down() + length = length-10 + + From 4ff527dc060341922fe3f2c51b79bd43cbbfd61b Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 16:51:04 -0500 Subject: [PATCH 11/13] mike and rebecca --- src/m5_your_turtles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index 1200d12..9b60f70 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -10,7 +10,7 @@ ######################################################################## ######################################################################## -# TODO: 2. +# DONE # # You should have RUN the PREVIOUS module and READ its code. # (Do so now if you have not already done so.) From 99f3a98bc1d9729491a740c4b6c70454eab680f1 Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 16:57:39 -0500 Subject: [PATCH 12/13] mike and rebecca --- src/m5_your_turtles.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index 9b60f70..653de31 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -31,29 +31,29 @@ import rosegraphics as rg window = rg.TurtleWindow() mike = rg.SimpleTurtle('turtle') -mike.pen = rg.Pen('green', 10) -mike.speed = 5 -size = 150 +mike.pen = rg.Pen('pink', 10) +mike.speed = 10 +size = 100 for k in range(10): mike.draw_circle(size) mike.pen_up() mike.right(45) mike.right(30) mike.pen_down() - size = size-10 + rebecca = rg.SimpleTurtle('turtle') -rebecca.pen = rg.Pen('pink',10) +rebecca.pen = rg.Pen('red',10) rebecca.speed = 5 -length = 200 -for j in range (15): - rebecca.draw_square(length) +length = 150 +for j in range (5): + rebecca.draw_regular_polygon(5,length) rebecca.pen_up() - rebecca.left(45) + rebecca.left(36) rebecca.forward(10) - rebecca.left(45) + rebecca.left(36) rebecca.pen_down() - length = length-10 + From b854c328bf4c72d8bf5dbe9c768f25ab6e0fd6dc Mon Sep 17 00:00:00 2001 From: niruien Date: Mon, 27 Nov 2017 17:47:30 -0500 Subject: [PATCH 13/13] mike and rebecca --- src/m5_your_turtles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index 653de31..37fe379 100644 --- a/src/m5_your_turtles.py +++ b/src/m5_your_turtles.py @@ -54,7 +54,7 @@ rebecca.left(36) rebecca.pen_down() - +window.close_on_mouse_click()