Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Doc/library/turtle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,15 @@ 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
``distance(start) < 1`` is a good way to know when the turtle is back at its
home position.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
home position.
start position.


Finally, complete the filling::
Expand Down
Loading