turtle.distance(x, y=None)
Parameters: |
|
---|
Return the distance from the turtle to (x,y), the given vector, or the given other turtle, in turtle step units.
>>> turtle.home() >>> turtle.distance(30,40) 50.0 >>> turtle.distance((30,40)) 50.0 >>> joe = Turtle() >>> joe.forward(77) >>> turtle.distance(joe) 77.0
Please login to continue.