Teach Your Kids To Code: A Parent-friendly Guide to Python Programming

(vip2019) #1
Loops Are Fun (You Can Say That Again) 71

the turtle to the heading we stored at x before going on to the next
part of the big spiral at }.
When our big loop ends after m has gone from 0 to 99 , we will
have drawn 100 small spirals in a big spiral pattern for a nice
kaleidoscope effect, as shown in Figure 4-7.


Figure 4-7: A square spiral with square spirals at every
corner (top) and a five-sided (pentagonal) spiral of
spirals (bottom) from our ViralSpiral.py program

Free download pdf