My Account Log in

1 option

Math adventures with Python : an illustrated guide to exploring math with code / Peter Farrell.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Farrell, Peter, 1966- author.
Language:
English
Subjects (All):
Mathematics--Computer-assisted instruction.
Mathematics.
Python (Computer program language).
Physical Description:
1 online resource (306 pages)
Edition:
1st edition
Place of Publication:
San Francisco : No Starch Press, [2019]
System Details:
text file
Summary:
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!
Contents:
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
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
PART 2: RIDING INTO MATH TERRITORY
4 TRANSFORMING AND STORING NUMBERS WITH ALGEBRA
Solving First-Degree Equations
Solving Higher-Degree Equations
Solving Equations Graphically
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
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
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
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
PART 3: BLAZING YOUR OWN TRAIL
9 BUILDING OBJECTS WITH CLASSES
Bouncing Ball Program
Grazing Sheep Program
10 CREATING FRACTALS USING RECURSION
The Length of a Coastline
Koch Snowflake
Sierpinski Triangle
Square Fractal
Dragon Curve
11 CELLULAR AUTOMATA
Creating a Cellular Automaton
Python Lists Are Strange
Playing the Game of Life
The Elementary Cellular Automaton
12 SOLVING PROBLEMS USING GENETIC ALGORITHMS
Using a Genetic Algorithm to Guess Phrases
Solving the Traveling Salesperson Problem (TSP)
INDEX.
Notes:
Description based on print version record.
Includes index.
ISBN:
9781492071228
1492071226
9781593278687
1593278683
OCLC:
1056203627

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account