I changed the definition of square to simplify.

Now it reads using the for_in command and only needs to be prompted to move forward and turn once.

I am finding that the directions you have written are clear and very easy to follow. Then when it comes time
to work through a checkpoint, I am struggling to apply the informaiton that was given to a task. It is like I
know what it means when I read it, but then I get lost and cannot figure out how this information is applicable. For this check point I worked ahead a little and saw that there
was a range command. I thought it must be applicable, but was not sure how. I talked through it with a
couple people and then looked up similar simplification examples to see how range was used. Then there was some trial
and error to get the details right.
This commit is contained in:
Rebecca Hankey 2024-09-11 22:27:33 -04:00
parent 3c0ade5337
commit 2e94868b5a
1 changed files with 7 additions and 9 deletions

View File

@ -1,16 +1,14 @@
from turtle import *
def square(side_length):
forward(side_length)
right(90)
forward(side_length)
right(90)
forward(side_length)
right(90)
forward(side_length)
right(90)
for _ in range(4):
forward(side_length)
right(90)
sizes = [20, 40, 60, 80, 100]
for size in sizes:
square(size)
square(20)
penup()
forward(40)
pendown()