Skip to main content
main-content

About this book

The second edition of this introductory text includes an expanded treatment of collisions, agent-based models, and insight into underlying system dynamics. Lab assignments are accessible and carefully sequenced for maximum impact. Students are able to write their own code in building solutions and Python is used to minimize any language barrier for beginners.
Problems involving visualization are emphasized throughout with interactive graphics, image files, and plots of generated data. This text aims to establish a core learning experience around which any number of other learning objectives could be included. The text is presented in eight chapters where each chapter contains three problems and each problem develops five specific lab assignments, plus additional questions and discussion. This approach seeks to leverage the immediate feedback provided by the computer to help students as they work toward writing code creatively.
All labs will scale to available hardware and free software could be used for the entire course, if desired. Lab assignments have been used since 2011 at the #1 ranked U.S. high school. It is an ideal textbook for high school courses that prepare students for advanced placement tests.

Table of Contents

Chapter 1. Simulation

Three hands-on computational problems for students are presented.Each problem is related to the overall topic of simulation, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book's companion website. The first problem simulates a one-dimensional random walk including analysis of results and predictive capabilities. The second problem simulates two-dimensional projectile motion including gravity, air resistance, and wind. The third problem simulates one-dimensional controlled descent with gravity, and suggests automating both the interactive and discovery aspects of the landing problem. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 2. Graphics

Three hands-on computational problems for students are presented. Each problem is related to the overall topic of graphics, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book's companion website. The first problem develops bit-map images with both rich features and extensive application. The second problem introduces the scalable nature of vector images including code organization and mathematical insight. The third problem builds an entire set of software tools for the interactive creation of images. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 3. Visualization

Three hands-on computational problems for students are presented. Each problem is related to the overall topic of visualization, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book's companion website. The first problem investigates the presentation of geospatial data from polygon boundaries and regional statistics. The second problem treats two-dimensional particle diffusion along with distribution analysis and varying initializations. The third problem presents alternative methods for approximating the mathematical constant PI and how those approaches might be visualized graphically. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 4. Efficiency

Three hands-on computational problems for students are presented. Each problem is related to the overall topic of efficiency, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book's companion website. The first problem analyzes the language content of primary-source text documents. The second problem considers the numerical approximation of solutions to analytic equations. The third problem investigates the rendering of a geometric fractal at different levels of magnification. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 5. Recursion

Three hands-on computational problems for students are presented. Each problem is related to the overall topic of recursion, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book’s companion website.The first problem examines the irregular connectivity of agents on a partially filled rectangular grid. The second problem compares the runtime of a number of calculations. The third problem simulates and analyzes the expected outcome of a straightforward one-player random game.Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 6. Projects

Three hands-on computational problems for students are presented. Each problem is related to building an independent project, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book’s companion website. The first problem builds a puzzle game step-by-step. The second problem builds a word-game with an emphasis on how to efficiently identify the solution set. The third problem builds a bubble-popping game involving the control of a beanbag cannon. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 7. Modeling, Part I

Three hands-on computational problems for students are presented. Each problem is related to the overall topic of modeling, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book's companion website. The first problem considers the one-dimensional case of interconnected springs moving together with gravity and air resistance. The second problem models collisions between two objects with different mass, changing velocity in one dimension. The third problem models collisions between two objects with the same mass, changing velocity in two dimensions. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert

Chapter 8. Modeling, Part II

Three hands-on computational problems for students are presented. Each problem is related to the overall topic of modeling, and is organized around five specific lab programming assignments. The coding examples and problem statements are presented in the Python 2 language, along with the Tk and PIL libraries, but any comparable system for code development could be substituted with minimal additional overhead. Supporting data files, demos, and practice exercises are also available from the book's companion website. The first problem models a herd of animals moving with specific intentions. The second problem models the interaction of two groups of different animals, one predator and one prey, and their mutual dynamics over time. The third problem builds a tree of life for a set of animals based on their respective gene sequences for a particular enzyme, by finding similarity scores between each pair of DNA strings. Concepts, skills, and applications are carefully sequenced for ease of understanding, rapid feedback, and differentiated progression for any level of prior coding experience, including absolute beginners.

Shane Torbert
Additional information