4.9. Summary of Turtle Methods

MethodParametersDescription
TurtleNoneCreates and returns a new turtle object
forwarddistanceMoves the turtle forward
backwarddistanceMoves the turle backward
rightangleTurns the turtle clockwise
leftangleTurns the turtle counter clockwise
upNonePicks up the turtles tail
downNonePuts down the turtles tail
colorcolor nameChanges the color of the turtle’s tail
fillcolorcolor nameChanges the color of the turtle will use to fill a polygon
headingNoneReturns the current heading
positionNoneReturns the current position
gotox,yMove the turtle to position x,y
begin_fillNoneRemember the starting point for a filled polygon
end_fillNoneClose the polygon and fill with the current fill color
dotNoneLeave a dot at the current position
stampNoneLeaves an impression of a turtle shape at the current location
shapeshape nameShould be ‘arrow’, ‘classic’, ‘turtle’, ‘circle’ or ‘square’

Nhận xét

Bài đăng phổ biến từ blog này

2.7. Operators and Operands - toán tử và toán hạng

1.11. Formal and Natural Languages