generated from mwc/project_drawing
I was able to draw a pattern of squares with a cool design.
Somewhere I got stuck was when I had to figure out how to turn around to draw more squares. A strategy I used to get un-stuck was trial and error until I got the turtle to rotate in the right way. Something I want to learn more about is how to do the same pattern but with different shapes. I challenged myself in completing this project in under 100 lines of code, and I succeeded with the help of defining and iterations.
This commit is contained in:
@@ -70,12 +70,13 @@ def drawleft():
|
||||
fly(57)
|
||||
|
||||
def draw():
|
||||
"The turtle draws two rows of squares per cycle."
|
||||
drawright()
|
||||
rotateright()
|
||||
drawleft()
|
||||
rotateleft()
|
||||
|
||||
"The turtle starts at a specific point and facing a specific direction."
|
||||
"The turtle starts at a specific point and facing a specific direction, then performs the draw function."
|
||||
penup()
|
||||
goto(-180,180)
|
||||
pendown()
|
||||
|
||||
Reference in New Issue
Block a user