This book is dedicated to all my students from whom I’ve learned so much
About the Author Peter Farrell was a math teacher for eight years starting first as a Peace Corps volunteer in Kenya He then worked as a computer science teacher for three years After reading Seymour Papert’s Mindstorms and being introduced to Python by a student he was inspired to bring programming into math class He is passionate about using computers to make learning math more relevant fun and challenging About the Technical Reviewer Paddy Gaunt graduated in engineering within weeks of the birth of the IBM PC and its associated MS DOS Much of the rest of his career has revolved around implementing mathematical or technical technical concepts in practical software Recently he reformed links with Cambridge University UK when he became lead developer of pi3d a python module for 3D graphics initially designed to run on the Raspberry Pi computer
Contents in Detail acknowledgments xv introduction xvii The Problem with School Math xviii About This Book xx Who Should Use This Book xxi What's in This Book xxi Downloading and Installing Python xxii Starting IDLE xxiii Installing Processing xxiii Part i Hitchin Up Your Python Wagon 1 3 Drawing Polygons with the turtle module Python’s turtle Module 4 Importing the turtle Module 4 Moving Your Turtle 5 Changing Directions 6 Repeating Code with Loops 7 Using the for Loop 7 Using a for Loop to Draw a Square 9 Creating Shortcuts with Functions 9 Using Variables to Draw Shapes 11 Using Variables in Functions 11 Variable Errors 12 Equilateral Triangles 13 Writing the triangle Function 13 Making Variables Vary 14 Summary 17