4.9. Summary of Turtle Methods¶
Method |
Parameters |
Description |
---|---|---|
forward |
distance |
Moves the turtle forward |
backward |
distance |
Moves the turle backward |
right |
angle |
Turns the turtle clockwise |
left |
angle |
Turns the turtle counter clockwise |
pendup |
None |
Picks up the turtles tail |
pendown |
None |
Puts down the turtles tail |
color |
color name |
Changes the color of the turtle’s tail |
fillcolor |
color name |
Changes the color of the turtle will use to fill a polygon |
setheading |
angle |
Turn the turtle to heading angle |
setposition |
x,y |
Move the turtle to position x,y |
begin_fill |
None |
Remember the starting point for a filled polygon |
end_fill |
None |
Close the polygon and fill with the current fill color |
You have attempted of activities on this page