diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 6fae397e84477ae..bcb91d0933003aa 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -159,14 +159,16 @@ filling can be turned on and off:: Next we'll create a loop:: + start = pos() + while True: forward(200) left(170) - if abs(pos()) < 1: + if distance(start) < 1: break -``abs(pos()) < 1`` is a good way to know when the turtle is back at its -home position. +``distance(start) < 1`` is a good way to know when the turtle is back at its +start position. Finally, complete the filling::