PyDocs

Nav

Graphical user interfaces with Tk

distance

turtle

function
  • distance(x, y=None)
Return the distance from the turtle to (x,y) in turtle step units. If y is None, x must be a pair of coordinates, a Vec2D, for example as returned by pos(), or another turtle.
1 Example
>>> turtle.home()
>>> turtle.distance(30,40)
50.0
>>> turtle.distance((30,40))
50.0
>>> joe = Turtle()
>>> joe.forward(77)
>>> turtle.distance(joe)
77.0
from the Python docs
See Also
No see-alsos for turtle/distance
0 Notes
No notes for distance