Skip to content

Commit d9776a1

Browse files
committed
completed m3
1 parent ce43ab0 commit d9776a1

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/m3_turtles.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"""
1515
########################################################################
1616
#
17-
# TODO: 1.
17+
# DONE: 1.
1818
# (Yes, that means for YOU to DO things per these instructions:)
1919
#
2020
# On Line 13 above, replace PUT_YOUR_OWN_NAME_HERE with your OWN name.
@@ -29,7 +29,7 @@
2929

3030
########################################################################
3131
#
32-
# TODO: 2.
32+
# DONE: 2.
3333
# Allow this file to use the rosegraphics.py file by marking the src
3434
# directory as a "Sources Root". Do that by right clicking on the src folder,
3535
# then selector Mark Directory As --> Sources Root
@@ -60,9 +60,9 @@
6060
# ----------------------------------------------------------------------
6161
# Ask the SimpleTurtle objects to do things:
6262
# ----------------------------------------------------------------------
63+
dave.forward(150)
64+
dave.left(40)
6365
dave.forward(100)
64-
dave.left(90)
65-
dave.forward(200)
6666

6767
# ----------------------------------------------------------------------
6868
# Construct a new turtle and ask it to do things.
@@ -72,12 +72,14 @@
7272
matt.speed = 10 # Faster
7373
matt.backward(50)
7474
matt.left(90)
75-
matt.forward(50)
76-
75+
matt.forward(150)
76+
matt.backward(80)
77+
matt.left(10)
78+
matt.forward(150)
7779

7880
########################################################################
7981
#
80-
# TODO: 3.
82+
# DONE: 3.
8183
# Add a few more line of your own code above to make one of the
8284
# existing Turtles move some more and/or have different
8385
# characteristics.
@@ -109,7 +111,13 @@
109111
# As always, test by running the module.
110112
#
111113
########################################################################
112-
114+
turtle = rg.SimpleTurtle('turtle')
115+
turtle.pen = rg.Pen('purple', 10)
116+
matt.speed = 5 # Faster
117+
matt.forward(100)
118+
matt.left(100)
119+
matt.backward(100)
120+
matt.right(10)
113121
########################################################################
114122
#
115123
# TODO: 5.

0 commit comments

Comments
 (0)