Not all snakes will squish you
Chances are you were given this book for your birthday. Or possibly for Christmas. Aunty Mildred was going to give you mismatching socks that were two sizes too large and you wouldn't want to wear when you grew into them anyway . Instead, she heard someone talking about this printable book, remembered you had one of those computer-thingamabobs that you tried to show her how to use last Christmas you gave up when she started trying to talk into the mouse , and got them to print another copy....
Chapter Turtles galore
Let's get back to the turtle module we started looking at in Chapter 3. Remember that to setup the canvas for the turtle to draw on, we need to import the module and the create the 'Pen' object gt gt gt import turtle gt gt gt t turtle.Pen We can now use basic functions to move the turtle around the canvas and draw simple shapes, but it's more interesting to use some of what we've already covered in the previous chapters. For example, the code we used to create a square earlier was gt gt gt...
Filling things
You've probably figured out by now that the fill function is switched on by passing the parameter '1', then switched off again with '0'. When you switch it off, the function actually fills in the area you've drawn assuming you've drawn at least part of a shape. So we can easily draw a filled in square by using code we created earlier. First, let's turn it into a function. To draw a square with turtle we do gt gt gt t.forward 50 gt gt gt t.left 90 gt gt gt t.forward 50 gt gt gt t.left 90 gt gt...


