Continuing in our Python Preschool lessons (on how to draw basic things with code ^__^). …
Pen Up, Pen Down.
If we’re using Python and we want to STOP drawing, we can use a
… of course using your own turtle name instead of ‘kitten’. You can then move the turtle around (
etc) and drop it down somewhere else on the canvas, with a
The syntax for a
loop is as follows:
for i in range(100):
That draws whatever this is, repeatedly, as it cycled through the loop 100 times:
Neat! 100 is too many times, though. For this, at least. So I’m going to lower that to 10 times instead, and increase the pivot on the turtle to 160 to make that corner sharper. Add a fill .. and …
It makes a purrty star!
Make your animation draw more quickly by adjusting the speed. 10 is the max:
zoom zoom ZOOM!