C.1 Basic Move and Draw
forward(distance) Move forward along the current heading by distance units.
backward(distance) Move backward along the current heading by distance units.
right(angle) Turn the turtle right by angle degrees.
left(angle) Turn the turtle left by angle degrees.
goto(pos, y=None) Move the turtle to an absolute position. If the tail is down, then a line will be drawn. The turtle’s orientation does not change. The position may be specified by a pair of numbers, or a tuple representing the x, y coordinates.
setx(x) Move the turtle to absolute (x, y) position where x is specified as a parameter and y does not change.
sety(y) Move the turtle to absolute (x, y) position where y is specified as a parameter and x does not change. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access