245 8th Street
San Francisco, CA 94103







Katie Haemmerle

Marketing Associate

mailto:[email protected]


Math Adventures with Python

A guide to exploring math with code


mathadv_cover-front.pngSan Francisco, CA (January 31, 2019)—One of the complaints about math education today is that it focuses on memorizing formulas rather than understanding the beauty and history behind the mathematical concepts. In Math Adventures with Python ($29.95, 304 pp., January 2019), math and computer science teacher Peter Farrell promises to transform math education by using the Python programming language to perform calculations and motivate students to discover the how behind algebra, geometry, and calculus. 


"Peter Farrell subverts the structure of a traditional math textbook and adopts an approach centered on student creation and discovery," said professor of Mathematics Dr. Tien Chih. "Rather than treating mathematical facts as symbolic formalism to be mindlessly imitated by students, Math Adventures with Python seeks to teach mathematics through guided discovery."


Farrell shows readers how to use code to visualize solutions to a range of math problems in algebra, trigonometry, matrices, and cellular automata. The book's projects teach Python programming basics like loops and variables so readers can build code from scratch to solve equations quickly, make cool things like an interactive rainbow grid, and automate tedious tasks like factoring numbers and finding square roots. Readers will write functions to draw and manipulate shapes, create oscillating sine waves, and solve equations graphically.


Readers will 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  


Math Adventures with Python will supercharge what students can do with math to make their learning experience more interactive and dynamic.







About the Author

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.



About No Starch Press

San Francisco-based No Starch Press has published the finest in geek entertainment since 1994—bestsellers like Python Crash Course, Python for Kids, The Linux Command Line, How Linux Works, and Hacking: The Art of Exploitation. Our titles have personality and attitude, our authors are passionate about their subjects, and our editorial team puts every book through a rigorous process of developmental editing, tech review, design, and production.