Want to know more about CS 152?

Learn to program in Python by solving real science problems: lake data, endangered species, and the physics of a pinball machine.

CS 152: Computational Thinking: Scientific Applications · Colby College Offered in Spring 2027

CS 152 is an introduction to computational thinking: how to describe and solve problems, in any discipline, using a computer. Instead of toy exercises, every week builds toward a project grounded in real data or a real scientific question. You'll learn to break big problems into small, testable pieces, to reason about what your code is doing, and to explain your results to people who don't write code.

A project you'll build: saving Kruger's elephants

Kruger National Park in South Africa can support about 7,000 elephants. For years the park kept the herd at that size by culling about 400 animals a year. Today, rangers use a gentler method: they dart adult females with a contraceptive. In Projects 5 and 6, you write the simulation that compares the two strategies.

The questions you answer

  • How do culling and contraception change the makeup of the herd: calves, juveniles, adults and seniors?
  • What share of adult females must be darted each year to keep the herd near 7,000, with no culling at all?

How you get there

  • Model each elephant as data and simulate survival, aging, pregnancy and births month by month for 200 years.
  • First find the answer by trial and error, then in Project 6 write a search algorithm that finds it automatically.
7,000target herd size
200 yearssimulated per run
9 functionsyou design and test
1 reportexplaining your results

The whole semester, project by project

  1. Creating Data: variables, functions, and writing your first data files.
  2. Maine Lake Data: clean and analyze real measurements from a lake-monitoring buoy and weather station.
  3. Water Density Statistics: build your own statistics module and turn temperature profiles into density profiles.
  4. Penguin Population Viability: run hundreds of possible futures to estimate the extinction risk for Galápagos penguins, with El Niño years striking by chance.
  5. Elephant Population Management: the Kruger simulation described above.
  6. Optimizing the Simulation: let a search algorithm find the darting rate for you.
  7. Object-Oriented Physics: balls, gravity and collisions, built with classes and objects.
  8. Pinball Wizard: put your physics engine to work in a playable pinball game.
  9. Final Project: design and build a project of your own choosing.

Try it: OOP Arcade — Blork Invasion

Studying should be fun too. This arcade game is a review tool from CS 152's unit on object-oriented programming: blast through vocabulary, inheritance and “what will this code print?” rounds, then take on the Blork Overlord.

▶ Play Blork Invasion

What past students have said

I took CS152 to learn about the applications of computation in science. This course definitely met my expectations of what was going to be taught. I really enjoyed the elephant project.

As someone who had previous computer science background, I still found this course challenging and learned new things that I can see being useful in the future for work, internships, or research.

— From anonymous student course evaluations

Questions about CS 152? Email me at aharper@colby.edu or stop by my office, Davis Science Center 311.