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


Peter Farrell.
Bok Engelsk 2019 · Electronic books.
Omfang
1 online resource (306 pages)
Utgave
1st edition
Opplysninger
Includes index.. - 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.. - 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!
Emner
Sjanger
Dewey
ISBN
1-4920-7122-6. - 1-59327-868-3

Bibliotek som har denne