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