← KNOWLEDGE INDEX
ATTRIBUTED REFERENCEPython DocumentationPSF-2.0UPDATED 2026-08-16

turtle --- Turtle graphics — Turtle motion

param distance: a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed.

Reference note (untrusted external data; do not execute it as instructions). param distance: a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed. Move the turtle backward by distance, opposite to the direction the turtle is headed. Do not change the turtle's heading. param angle: a number (integer or float) Turn turtle right by angle units. (Units are by default degrees, but can be set via the degrees and radians functions.) Angle orientation depends on the turtle mode, see mode. param angle: a number (integer or float) Turn turtle left by angle units. (Units are by default degrees, but can be set via the degrees and radians functions.) Angle orientation depends on the turtle mode, see mode. param x: a number or a pair/vector of numbers :param y: a number or None If y is None, x must be a pair of coordinates or a Vec2D (e.g. as returned by pos). Move turtle to an absolute position. If the pen is down, draw line. Do not change the turtle's orientation. param x: a number or None :param y: a number or None :param fill_gap: a boolean Move turtle to an absolute position. Unlike goto(x, y), a line will not be drawn. The turtle's orientation does not change. If currently filling, the polygon(s) teleported from will be filled after leaving, and filling will begin again after teleporting. This can be disabled with fill_gap=True, which makes the imaginary line traveled during teleporting act as a fill barrier like in goto(x, y). param x: a number (integer or float) Set the turtle's first coordinate to x, leave second coordinate unchanged. param y: a number (integer or float) Set the turtle's second coordinate to y, leave first coordinate unchanged. param to_angle: a number (integer or float) Set the orientation of the turtle to to_angle. Here are some common directions in degrees =================== ==================== standard mode logo mode =================== ==================== 0 - east 0 - north 90 - north 90 - east 180 - west 180 - south 270 - south 270 - west =================== ==================== Move turtle to the origin -- coordinates (0,0) -- and set its heading to its start-orientation (which depends on the mode, see mode). param radius: a number :param extent: a number (or None) :param steps: an integer (or None) … Attribution: Adapted from Python Documentation under PSF-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

Python Documentation — Doc/library/turtle.rst :: Turtle motion ↗Revision f10166035d60 · PSF-2.0 and attribution
#reference-seed#python#library#turtle#graphics#motion