Home

Carnegie Mellon Quality. Learn for free.

The last coding course you'll ever need

Programming for Lovers is an open course where you write code to answer real scientific questions, built on award-winning teaching from Carnegie Mellon University.

Table of Contents

Ancient Greek Math and The Foundations of Computer Science

Algorithms are the building blocks of computer science. We'll explore two beautiful mathematical algorithms from ancient Greece, introduce pseudocode, and implement and time these algorithms in code.
Chapter 0

Hunting for Hidden Messages in Bacterial Genomes

Every organism on Earth has a genome made of nucleotides — letters from the four-symbol alphabet {ACGT}. How can we find hidden messages lurking within DNA? Even simple algorithms can reveal deep insights into the life of a bacterium.
Chapter 1

Forecasting a Presidential Election

Monte Carlo simulation uses randomness across many trials to estimate outcomes. We'll apply this technique to simulate the 2016 US presidential election from polling data — and reflect on the pitfalls of forecasting.
Chapter 2

Discovering a Self-Replicating Automaton

Researchers have yet to build a robot that can both perform complex tasks and replicate itself — yet the theoretical foundations are decades old. We'll explore cellular automata and the Game of Life, then build an automaton capable of self-replication.
Chapter 3

Building a Gravity Simulator with Object-Oriented Programming

We'll introduce object-oriented programming and abstraction, then simulate how a small universe of bodies moves under Newtonian gravity by exploring the three-body problem.
Chapter 4

Evolutionary Trees and More Object-Oriented Programming

We'll deepen our understanding of object-oriented programming by implementing UPGMA, one of the most famous algorithms for constructing evolutionary trees.
Chapter 5

Watch Our Intro Video

Hear From Our Learners

Scroll to Top
Programming for Lovers banner no background
programming for lovers logo cropped

Join our community!

programming for lovers logo cropped
Programming for Lovers banner no background

Join our community!