6.4. Program Implementation - 2ΒΆ
Now that rectangle
is working, we can use it to write our next procedure. I will tackle
drawWall
next. This procedure will take the name of the turtle, set a color, and then
draw a 300x200 rectangle.
- turtleName
- drawWall calls its parameter turtleName. But there is nothing named "turtle" in drawDoor.
- turtle
- rectangle calls its parameter turtle. But there is nothing named "turtle" in drawDoor.
- currentTurtle
- Correct.
We want to write the code for the drawDoor
procedure. Below is the code for it.
def drawDoor(currentTurtle):
______________.fillcolor("black")
rectangle(______________, 50, 100)
What name belongs in the ______________?
You have attempted of activities on this page