
Math Adventures with Python
An Illustrated Guide to Exploring Math with Code
Peter Farrell(Author)
No Starch Press
Published on 8. January 2019
304 pages
978-1-59327-868-7 (ISBN)
System requirements
for ePUB without DRM
E-Book Single Licence
You are acquiring a single user licence for this eBook, which you might not transfer. [L]
Available for download
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Learn math by getting creative with code! Use the Python programming language to transform learning high school-level math topics like algebra, geometry, trigonometry, and calculus!
Math Adventures with Python will show you how to harness the power of programming to keep math relevant and fun. With the aid of the Python programming language, you'll learn how to visualize solutions to a range of math problems as you use code to explore key mathematical concepts like algebra, trigonometry, matrices, and cellular automata.
Once you've learned the programming basics like loops and variables, you'll write your own programs to solve equations quickly, make cool things like an interactive rainbow grid, and automate tedious tasks like factoring numbers and finding square roots. You'll learn how to write functions to draw and manipulate shapes, create oscillating sine waves, and solve equations graphically.
You'll also learn how to:
- Draw and transform 2D and 3D graphics with matrices
- Make colorful designs like the Mandelbrot and Julia sets with complex numbers
- Use recursion to create fractals like the Koch snowflake and the Sierpinski triangle
- Generate virtual sheep that graze on grass and multiply autonomously
- Crack secret codes using genetic algorithms
As you work through the book's numerous examples and increasingly challenging exercises, you'll code your own solutions, create beautiful visualizations, and see just how much more fun math can be!
Math Adventures with Python will show you how to harness the power of programming to keep math relevant and fun. With the aid of the Python programming language, you'll learn how to visualize solutions to a range of math problems as you use code to explore key mathematical concepts like algebra, trigonometry, matrices, and cellular automata.
Once you've learned the programming basics like loops and variables, you'll write your own programs to solve equations quickly, make cool things like an interactive rainbow grid, and automate tedious tasks like factoring numbers and finding square roots. You'll learn how to write functions to draw and manipulate shapes, create oscillating sine waves, and solve equations graphically.
You'll also learn how to:
- Draw and transform 2D and 3D graphics with matrices
- Make colorful designs like the Mandelbrot and Julia sets with complex numbers
- Use recursion to create fractals like the Koch snowflake and the Sierpinski triangle
- Generate virtual sheep that graze on grass and multiply autonomously
- Crack secret codes using genetic algorithms
As you work through the book's numerous examples and increasingly challenging exercises, you'll code your own solutions, create beautiful visualizations, and see just how much more fun math can be!
More details
Language
English
Place of publication
New York
United States
Product notice
Reflowable
File size
23,17 MB
ISBN-13
978-1-59327-868-7 (9781593278687)
Schweitzer Classification
Other editions
Additional editions

Book
01/2019
No Starch Press
€28.50
Article in reprint
Person
Peter Farrell is a math and computer science teacher with a passion for customizing ("hacking") math education and learning with technology. He lives in the San Francisco Bay Area with his wife and children.
Content
- Intro
- Title Page
- Copyright Page
- Dedication
- ABOUT THE AUTHOR
- ABOUT THE TECHNICAL REVIEWER
- BRIEF CONTENTS
- CONTENTS IN DETAIL
- ACKNOWLEDGMENTS
- INTRODUCTION
- The Problem with School Math
- About This Book
- Who Should Use This Book
- What's in This Book?
- Downloading and Installing Python
- Starting IDLE
- Installing Processing
- PART I: HITCHIN' UP YOUR PYTHON WAGON
- 1 DRAWING POLYGONS WITH THE TURTLE MODULE
- Python's turtle Module
- Repeating Code with Loops
- Creating Shortcuts with Functions
- Using Variables to Draw Shapes
- Equilateral Triangles
- Summary
- 2 MAKING TEDIOUS ARITHMETIC FUN WITH LISTS AND LOOPS
- Basic Operators
- Data Types in Python
- Using Lists to Store Values
- Using Lists in Loops
- Summation
- Finding the Average of a List of Numbers
- Summary
- 3 GUESSING AND CHECKING WITH CONDITIONALS
- Comparison Operators
- Making Decisions with if and else Statements
- Using Conditionals to Find Factors
- Creating a Number-Guessing Game
- Finding Square Roots
- Summary
- PART 2: RIDING INTO MATH TERRITORY
- 4 TRANSFORMING AND STORING NUMBERS WITH ALGEBRA
- Solving First-Degree Equations
- Solving Higher-Degree Equations
- Solving Equations Graphically
- Summary
- 5 TRANSFORMING SHAPES WITH GEOMETRY
- Drawing a Circle
- Specifying Location Using Coordinates
- Transformation Functions
- Animating Objects
- Creating an Interactive Rainbow Grid
- Drawing Complex Patterns Using Triangles
- Summary
- 6 CREATING OSCILLATIONS WITH TRIGONOMETRY
- Using Trigonometry for Rotations and Oscillations
- Writing Functions to Draw Polygons
- Making Sine Waves
- Creating a Spirograph Program
- Making Harmonographs
- Summary
- 7 COMPLEX NUMBERS
- The Complex Coordinate System
- Adding Complex Numbers
- Multiplying a Complex Number by i
- Multiplying Two Complex Numbers
- Writing the magnitude() Function
- Creating the Mandelbrot Set
- Creating the Julia Set
- Summary
- 8 USING MATRICES FOR COMPUTER GRAPHICS AND SYSTEMS OF EQUATIONS
- What Is a Matrix?
- Adding Matrices
- Multiplying Matrices
- Order Matters in Matrix Multiplication
- Drawing 2D Shapes
- Transforming Matrices
- Transposing Matrices
- Rotating Matrices in Real Time
- Creating 3D Shapes
- Creating the Rotation Matrix
- Solving Systems of Equations with Matrices
- Summary
- PART 3: BLAZING YOUR OWN TRAIL
- 9 BUILDING OBJECTS WITH CLASSES
- Bouncing Ball Program
- Grazing Sheep Program
- Summary
- 10 CREATING FRACTALS USING RECURSION
- The Length of a Coastline
- Koch Snowflake
- Sierpinski Triangle
- Square Fractal
- Dragon Curve
- Summary
- 11 CELLULAR AUTOMATA
- Creating a Cellular Automaton
- Python Lists Are Strange
- Playing the Game of Life
- The Elementary Cellular Automaton
- Summary
- 12 SOLVING PROBLEMS USING GENETIC ALGORITHMS
- Using a Genetic Algorithm to Guess Phrases
- Solving the Traveling Salesperson Problem (TSP)
- Summary
- INDEX
System requirements
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.