Skip to content

Commit 048b77e

Browse files
committed
completed m3
1 parent ccfe3fb commit 048b77e

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

src/m2_hello_world.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
########################################################################
2828
#
29-
# TODO: 2.
29+
# DONE: 2.
3030
# Notice the small horizontal BLUE bars on the scrollbar-like thing
3131
# on the right. Each blue bar indicates a TO DO in this module.
3232
#
@@ -59,10 +59,10 @@
5959
# Look at the Console to be sure that your string printed as expected.
6060
#
6161
########################################################################
62-
62+
print('Hello World')
6363
########################################################################
6464
#
65-
# TODO: 4.
65+
# DONE: 4.
6666
# Add yet another print statement.
6767
# This one should print the *product* of 3,607 and 34,227.
6868
# Let the computer do the arithmetic for you (no calculators!).
@@ -76,7 +76,7 @@
7676
print(3404 * 837)
7777
########################################################################
7878
#
79-
# TODO: 5.
79+
# DONE: 5.
8080
# Look at the list of files in this project to the left.
8181
# Note that this file (m2_hello_world.py) is now displayed in a blue
8282
# font color (if the file is highlighted select a different file so yu can

src/m3_turtles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
########################################################################
9494
#
95-
# TODO: 4.
95+
# DONE: 4.
9696
# The code above CONSTRUCTS two SimpleTurtle objects and gives those objects NAMES:
9797
# dave matt
9898
#

src/m5_your_turtles.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
Your chance to explore Loops and Turtles!
33
44
Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder,
5-
their colleagues and PUT_YOUR_NAME_HERE.
5+
their colleagues and Benjamin Feaster.
66
"""
77
########################################################################
8-
# TODO: 1.
8+
# DONE: 1.
99
# On Line 5 above, replace PUT_YOUR_NAME_HERE with your own name.
1010
########################################################################
1111

1212
########################################################################
13-
# TODO: 2.
13+
# DONE: 2.
1414
#
1515
# You should have RUN the PREVIOUS module and READ its code.
1616
# (Do so now if you have not already done so.)
@@ -28,3 +28,30 @@
2828
#
2929
# Don't forget to COMMIT your work by using VCS ~ Commit and Push.
3030
########################################################################
31+
import rosegraphics as rg
32+
33+
window = rg.TurtleWindow()
34+
35+
purple_turtle = rg.SimpleTurtle('turtle')
36+
purple_turtle.pen = rg.Pen('purple', 1)
37+
purple_turtle.speed = 100
38+
39+
red_turtle = rg.SimpleTurtle('turtle')
40+
red_turtle.pen = rg.Pen('red', 1)
41+
red_turtle.speed = 100
42+
43+
size = 150
44+
45+
for i in range(20):
46+
purple_turtle.draw_circle(size)
47+
red_turtle.draw_circle(size - 20)
48+
49+
purple_turtle.right(100)
50+
purple_turtle.forward(10)
51+
purple_turtle.left(45)
52+
53+
red_turtle.right(100)
54+
red_turtle.forward(10)
55+
red_turtle.left(45)
56+
57+
window.close_on_mouse_click()

0 commit comments

Comments
 (0)