There was an error while loading. Please reload this page.
1 parent 7763c98 commit 46ab1eeCopy full SHA for 46ab1ee
1 file changed
Doc/library/turtle.rst
@@ -167,13 +167,15 @@ filling can be turned on and off::
167
168
Next we'll create a loop::
169
170
+ start = pos()
171
+
172
while True:
173
forward(200)
174
left(170)
- if abs(pos()) < 1:
175
+ if distance(start) < 1:
176
break
177
-``abs(pos()) < 1`` is a good way to know when the turtle is back at its
178
+``distance(start) < 1`` is a good way to know when the turtle is back at its
179
home position.
180
181
Finally, complete the filling::
0 commit comments