Page 192 - Programming With Python 3
P. 192
An Introduction to STEM Programming with Python — 2019-09-03a Page 179
Chapter 18 — Turtle Graphics
1| import turtle
2|
Free
3| moxy = turtle.Turtle()
4|
5| l = 10
6| for side in range(40):
7| if side % 3 ==0 :
8| moxy.penup()
eBook
9| else:
10| moxy.pendown()
11| moxy.forward(l)
12| l = l + 3
13| moxy.right(90)
14|
Edition
15| moxy.pendown()
16| moxy.home()
Please support this work at
http://syw2l.org
Free
Illustration 24: The Turtle Draws an
Odd Spiral
eBook
Colors and Line Thickness
Edition
We can tell the turtle what color and how wide if a line to draw.
Copyright 2019 — James M. Reneau Ph.D. — http://www.syw2l.org — This work is licensed
under a Creative Commons Attribution-ShareAlike 4.0 International License.

