Python Playground

Geeky Projects for the Curious Programmer

Paperback
$29.95 US
7.02"W x 9.25"H x 0.89"D  
On sale Oct 01, 2015 | 352 Pages | 9781593276041
Grades 6-12
Python is a powerful programming language that’s easy to learn and fun to play with. But once you’ve gotten a handle on the basics, what do you do next?

Python Playground is a collection of imaginative programming projects that will inspire you to use Python to make art and music, build simulations of real-world phenomena, and interact with hardware like the Arduino and Raspberry Pi. You’ll learn to use common Python tools and libraries like numpy, matplotlib, and pygame to do things like:
–Generate Spirograph-like patterns using parametric equations and the turtle module
–Create music on your computer by simulating frequency overtones
–Translate graphical images into ASCII art
–Write an autostereogram program that produces 3D images hidden beneath random patterns
–Make realistic animations with OpenGL shaders by exploring particle systems, transparency, and billboarding techniques
–Construct 3D visualizations using data from CT and MRI scans
–Build a laser show that responds to music by hooking up your computer to an Arduino


Programming shouldn’t be a chore. Have some solid, geeky fun with Python Playground.

The projects in this book are compatible with both Python 2 and 3.
Mahesh Venkitachalam is a software engineer with two decades of programming experience. He has nurtured a passion for technology since the eighth grade, which he channels into his popular electronics and programming blog, electronut.in.
Part 1: Warming Up
Chapter 1: Parsing iTunes Playlists
Chapter 2: Spirographs
Part 2: Simulating Life
Chapter 3: Conway's Game of Life
Chapter 4: Generating Musical Overtones with the Karplus-Strong Algorithm
Chapter 5: Boids: Simulating a Flock
Part 3: Fun with Images
Chapter 6: ASCII Art
Chapter 7: Photomosaics
Chapter 8: Autostereograms
Part 4: Enter 3D
Chapter 9: Understanding OpenGL
Chapter 10: Particle Systems
Chapter 11: Volume Rendering
Part 5: Hardware Hacking
Chapter 12: Introduction to Arduino
Chapter 13: Laser Audio Display
Chapter 14: A Raspberry Pi-based Weather Monitor
Appendix A: Software Installation
Appendix B: Basic Practical Electronics
Appendix C: Raspberry Pi Tips & Tricks
"If you want to become adept at doing clever things with Python, I doubt you'll find a better group of projects or more useful help for understanding how the language works."
—Network World

"This is a book that belongs in every Python programmer's library."
—Full Circle Magazine

"Packed with interesting projects."
—iProgrammer

"Python Playground targets programmers who want to further improve their skills and knowledge of the language. The book does a good job of explaining all relevant details and makes sure that readers get a clear picture of what is going on."
—InfoQ

About

Python is a powerful programming language that’s easy to learn and fun to play with. But once you’ve gotten a handle on the basics, what do you do next?

Python Playground is a collection of imaginative programming projects that will inspire you to use Python to make art and music, build simulations of real-world phenomena, and interact with hardware like the Arduino and Raspberry Pi. You’ll learn to use common Python tools and libraries like numpy, matplotlib, and pygame to do things like:
–Generate Spirograph-like patterns using parametric equations and the turtle module
–Create music on your computer by simulating frequency overtones
–Translate graphical images into ASCII art
–Write an autostereogram program that produces 3D images hidden beneath random patterns
–Make realistic animations with OpenGL shaders by exploring particle systems, transparency, and billboarding techniques
–Construct 3D visualizations using data from CT and MRI scans
–Build a laser show that responds to music by hooking up your computer to an Arduino


Programming shouldn’t be a chore. Have some solid, geeky fun with Python Playground.

The projects in this book are compatible with both Python 2 and 3.

Author

Mahesh Venkitachalam is a software engineer with two decades of programming experience. He has nurtured a passion for technology since the eighth grade, which he channels into his popular electronics and programming blog, electronut.in.

Table of Contents

Part 1: Warming Up
Chapter 1: Parsing iTunes Playlists
Chapter 2: Spirographs
Part 2: Simulating Life
Chapter 3: Conway's Game of Life
Chapter 4: Generating Musical Overtones with the Karplus-Strong Algorithm
Chapter 5: Boids: Simulating a Flock
Part 3: Fun with Images
Chapter 6: ASCII Art
Chapter 7: Photomosaics
Chapter 8: Autostereograms
Part 4: Enter 3D
Chapter 9: Understanding OpenGL
Chapter 10: Particle Systems
Chapter 11: Volume Rendering
Part 5: Hardware Hacking
Chapter 12: Introduction to Arduino
Chapter 13: Laser Audio Display
Chapter 14: A Raspberry Pi-based Weather Monitor
Appendix A: Software Installation
Appendix B: Basic Practical Electronics
Appendix C: Raspberry Pi Tips & Tricks

Praise

"If you want to become adept at doing clever things with Python, I doubt you'll find a better group of projects or more useful help for understanding how the language works."
—Network World

"This is a book that belongs in every Python programmer's library."
—Full Circle Magazine

"Packed with interesting projects."
—iProgrammer

"Python Playground targets programmers who want to further improve their skills and knowledge of the language. The book does a good job of explaining all relevant details and makes sure that readers get a clear picture of what is going on."
—InfoQ

Books for Native American Heritage Month

In celebration of Native American Heritage Month this November, Penguin Random House Education is highlighting books that detail the history of Native Americans, and stories that explore Native American culture and experiences. Browse our collections here: Native American Creators Native American History & Culture

Read more

2024 Middle and High School Collections

The Penguin Random House Education Middle School and High School Digital Collections feature outstanding fiction and nonfiction from the children’s, adult, DK, and Grupo Editorial divisions, as well as publishers distributed by Penguin Random House. Peruse online or download these valuable resources to discover great books in specific topic areas such as: English Language Arts,

Read more

PRH Education High School Collections

All reading communities should contain protected time for the sake of reading. Independent reading practices emphasize the process of making meaning through reading, not an end product. The school culture (teachers, administration, etc.) should affirm this daily practice time as inherently important instructional time for all readers. (NCTE, 2019)   The Penguin Random House High

Read more

PRH Education Translanguaging Collections

Translanguaging is a communicative practice of bilinguals and multilinguals, that is, it is a practice whereby bilinguals and multilinguals use their entire linguistic repertoire to communicate and make meaning (García, 2009; García, Ibarra Johnson, & Seltzer, 2017)   It is through that lens that we have partnered with teacher educators and bilingual education experts, Drs.

Read more