From 9c0b537222553674359ed6f48644aca3ce275bb1 Mon Sep 17 00:00:00 2001 From: whitacbc Date: Sat, 25 Nov 2017 22:09:29 -0500 Subject: [PATCH 1/5] 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..0eed696 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 Brian Whitacre. """ ######################################################################## # From 82a9d6eaa858dd60e0bd86dd71a983c0f5a16d69 Mon Sep 17 00:00:00 2001 From: whitacbc Date: Mon, 27 Nov 2017 14:34:53 -0500 Subject: [PATCH 2/5] I added my name --- src/m1e_comments_strings_print.py | 2 +- src/m2_hello_world.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/m1e_comments_strings_print.py b/src/m1e_comments_strings_print.py index 18eb8a0..a6b1f31 100644 --- a/src/m1e_comments_strings_print.py +++ b/src/m1e_comments_strings_print.py @@ -2,7 +2,7 @@ # # Run this module by right clicking anywhere in this window, then select # Run 'name of file' -# After running, find the Console tab (below) and confirm that everything +# After running, find the Consohttps://github.com/whitacbc/IntroductionToPython.gitle tab (below) and confirm that everything # did indeed get printed (displayed). This module is just an example. # Once you have run the file, feel free to play with it some, then you # can move on to m2. diff --git a/src/m2_hello_world.py b/src/m2_hello_world.py index aaa506a..a7b615b 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 @@ -59,10 +59,10 @@ # Look at the Console to be sure that your string printed as expected. # ######################################################################## - +print("IM ALIVE") ######################################################################## # -# 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,7 +73,7 @@ # (HINT: It is an INTERESTING number.) Get help if your value is wrong. # ######################################################################## - +print(3607*34227) ######################################################################## # # TODO: 5. From 08853923d9f43f594b5e650bfbcee629eaf04caa Mon Sep 17 00:00:00 2001 From: whitacbc Date: Mon, 27 Nov 2017 14:36:07 -0500 Subject: [PATCH 3/5] Finished M2 hellow world --- 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 a7b615b..8692cca 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("IM ALIVE") +print("IM ALIVE ") ######################################################################## # # DONE: 4. From b8b12bb52dc74ad4599c75d721be72588495daaa Mon Sep 17 00:00:00 2001 From: whitacbc Date: Mon, 27 Nov 2017 15:00:47 -0500 Subject: [PATCH 4/5] finished M3 --- src/m3_turtles.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/m3_turtles.py b/src/m3_turtles.py index 0eed696..301bc00 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 @@ -61,8 +61,11 @@ # Ask the SimpleTurtle objects to do things: # ---------------------------------------------------------------------- dave.forward(100) -dave.left(90) +dave.left(45) dave.forward(200) +dave.right(45) +dave.backward(400) + # ---------------------------------------------------------------------- # Construct a new turtle and ask it to do things. @@ -73,11 +76,13 @@ matt.backward(50) matt.left(90) matt.forward(50) +matt.right (45) +matt.backward(400) ######################################################################## # -# 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,13 @@ # As always, test by running the module. # ######################################################################## +John = rg.SimpleTurtle("turtle") +John.forward(100) +John.draw_circle(100) #makes john draw a circle ######################################################################## # -# 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 f42c5dc7c8120329779d281bc1a6d28f6da9300c Mon Sep 17 00:00:00 2001 From: whitacbc Date: Mon, 27 Nov 2017 20:55:16 -0500 Subject: [PATCH 5/5] finsished m5 --- src/m5_your_turtles.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/m5_your_turtles.py b/src/m5_your_turtles.py index d9de2a6..bb47a8b 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 Brian Whitacre. """ ######################################################################## -# TODO: 1. +# DONE: 1. # On Line 5 above, replace PUT_YOUR_NAME_HERE with your own name. ######################################################################## @@ -28,3 +28,29 @@ # # Don't forget to COMMIT your work by using VCS ~ Commit and Push. ######################################################################## +import rosegraphics as rg # import the rosegraphics +window = rg.TurtleWindow() # set up windows +# set up the names of the turtle +John = rg.SimpleTurtle() +Mike = rg.SimpleTurtle() +Shell = rg.SimpleTurtle() +# changes colors of the turtles +John.pen = rg.Pen("red",1) +Mike.pen = rg.Pen('blue',1) +Shell.pen = rg.Pen('green',1) +# moves the turtles John and Mike sideways +John.forward(100) +Mike.backward(100) +# change speed to be fast +John.speed = 30 +Mike.speed= 30 +Shell.speed = 30 +size = 46 # size of the hexagon +for i in range(47): + # stat drawing hexagons larger and larger + John.draw_regular_polygon(6, size) + Mike.draw_regular_polygon(6, size) + Shell.draw_regular_polygon(6, size) + size = i # change size of hexagon + print(size) # print size of hexagon +window.close_on_mouse_click() \ No newline at end of file