
Microbiology, bacterial population dynamics, and the race against antibiotic resistance.
The Messy Lab
In September 1928, Alexander Fleming returned to his laboratory at St Mary's Hospital in London after a two-week holiday. He was not a tidy man. Before leaving, he had stacked several petri dishes containing Staphylococcus bacteria cultures on his bench, intending to clean them when he got back.
When he picked up one of the dishes, he noticed something strange. A blob of blue-green mold — later identified as Penicillium notatum — had contaminated the dish. This happened all the time in laboratories. What was unusual was what had happened around the mold.
The bacteria were gone. In a perfect circle around the mold colony, the Staphylococcus had dissolved. The mold was producing something that killed bacteria.
"That's funny," Fleming said — the most understated reaction in the history of medicine.
He grew more of the mold, extracted the liquid it produced, and tested it against a range of bacteria. It killed Staphylococcus, Streptococcus, and the bacteria that cause diphtheria, scarlet fever, and pneumonia. He called the substance penicillin.
Then he published his results. And nothing happened.
The Fifteen-Year Gap
Fleming's 1929 paper described penicillin's antibacterial properties clearly. But he couldn't figure out how to purify it. The mold produced penicillin in tiny quantities, mixed with a soup of other chemicals. Every attempt to concentrate it destroyed the active molecule. Fleming concluded that penicillin was too unstable to be useful as a medicine.
For fifteen years, penicillin sat in the scientific literature — a curiosity that everyone knew about and nobody could use.
Then, in 1939, World War II began. Suddenly, the need for antibacterial drugs became urgent. Soldiers were dying not from bullets but from infected wounds — a cut that would heal in peacetime became fatal when bacteria invaded, and the body's immune system couldn't keep up.
At Oxford University, two scientists — the Australian pathologist Howard Florey and the German-British biochemist Ernst Boris Chain — decided to try again. They read Fleming's old paper. They grew Penicillium mold. And they developed a method to extract and purify penicillin using freeze-drying and chromatography.
Their first test was on a policeman named Albert Alexander, who was dying from a face infection that had spread to his blood. After receiving penicillin injections, Alexander improved dramatically within 24 hours. His fever dropped. His infection retreated. For the first time in history, a bacterial infection was being beaten by a drug.
But Florey and Chain didn't have enough penicillin. After five days of treatment, they ran out. Alexander relapsed and died.
Growing Mold in Bedpans
The problem was scale. Penicillium mold grows slowly and produces penicillin in minuscule quantities. To treat one patient for one week required 2,000 litres of mold culture — the output of hundreds of growing vessels.
Florey's lab couldn't afford proper fermentation equipment. So his team used what they had: bedpans, milk churns, biscuit tins, and bathtubs. They turned the Dunn School of Pathology into a mold farm, growing Penicillium in every available container.
By 1941, they had produced enough penicillin to conduct clinical trials. The results were extraordinary. Infections that had been a death sentence — septicaemia, gangrene, pneumonia — could now be cured in days. But producing enough for the entire Allied military required an industrial solution.
Florey flew to the United States, where the US Department of Agriculture's laboratory in Peoria, Illinois made two critical breakthroughs. First, they found that growing Penicillium in corn steep liquor (a waste product from corn processing) increased penicillin yield tenfold. Second, they discovered a new strain of Penicillium — found on a mouldy cantaloupe melon from a Peoria market — that produced 200 times more penicillin than Fleming's original strain.
By D-Day, June 6, 1944, American pharmaceutical companies were producing 2.3 million doses per month. Enough for every wounded soldier in the Allied forces. The mortality rate from infected wounds dropped from 18% in World War I to less than 1% in World War II.
How Penicillin Works
Penicillin kills bacteria by attacking their cell wall. Bacteria are surrounded by a rigid wall made of a molecule called peptidoglycan — a mesh of sugar chains cross-linked by short peptide bridges. This wall keeps the bacterium from exploding under its own internal pressure (which is about 5 atmospheres — five times the air pressure around you right now).
Penicillin mimics the shape of the D-alanyl-D-alanine end of the peptide bridge. It binds to the enzyme — transpeptidase — that creates the cross-links, blocking it. Without new cross-links, the cell wall weakens as the bacterium grows. Eventually, the internal pressure ruptures the weakened wall, and the bacterium bursts like an overinflated balloon.
This is why penicillin only kills bacteria that are actively growing and dividing — dormant bacteria aren't making new cell wall, so penicillin has nothing to block.
The Resistance Crisis
Fleming himself predicted the problem. In his 1945 Nobel Prize acceptance speech, he warned: "It is not difficult to make microbes resistant to penicillin in the laboratory by exposing them to concentrations not sufficient to kill them."
He was right. By the 1950s, resistant strains of Staphylococcus were appearing in hospitals. By the 2000s, MRSA (methicillin-resistant Staphylococcus aureus) had become a global health crisis.
The mechanism is evolution by natural selection, running on fast-forward. A single bacterium can reproduce every 20 minutes. In a population of a billion bacteria, random mutations will produce a few individuals with slight resistance to penicillin. If you treat that population with penicillin but don't kill every bacterium — because you stopped the course too early, or took too low a dose — the resistant ones survive and multiply. Within days, you have a population that is entirely resistant.
This is happening today with multiple antibiotics. The World Health Organization has identified antibiotic resistance as one of the top ten threats to global health. We are running out of drugs faster than we can develop new ones.
The story of penicillin is the story of biology at its most powerful — a mold that saves millions of lives, and the bacteria that are learning to fight back.
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
import numpy as np
import matplotlib.pyplot as plt
# Your first data analysis with Python
data = [45, 52, 38, 67, 41, 55, 48] # measurements
mean = np.mean(data)
plt.bar(range(len(data)), data)
plt.axhline(mean, color='red', linestyle='--', label=f'Mean: {mean:.1f}')
plt.xlabel("Sample")
plt.ylabel("Value")
plt.title("Microbiology & Population Dynamics — Sample Data")
plt.legend()
plt.show()This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Build an Antibiotic Resistance Simulator.
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.
How penicillin kills bacteria, how bacteria fight back, and the mathematics of antibiotic resistance.
The big idea: "The Discovery of Penicillin" teaches us about Microbiology & Population Dynamics — and you don't need to write a single line of code to understand it.
A single bacterium lands on a warm piece of chicken left on the kitchen counter. It divides into two bacteria in 20 minutes. Each of those divides into two more. After 40 minutes, there are 4. After an hour, 8. After two hours, 64. This doesn't sound like much.
But keep going. After 6 hours: 262,144 bacteria. After 12 hours: 68 billion. After 24 hours: about 4.7 sextillion (4,700,000,000,000,000,000,000). One bacterium becomes a number larger than the number of stars in the observable universe — in a single day.
This is exponential growth — each generation doubles the population. The key feature of exponential growth is that it starts slowly and then accelerates dramatically. For the first few hours, the numbers seem manageable. Then suddenly, they explode.
This is why food poisoning hits you hours after eating contaminated food — the bacteria were growing all that time, but the population was too small to cause symptoms. By the time you feel sick, there are billions of them.
Check yourself: If a bacterial population doubles every 20 minutes, how many doublings occur in 10 hours? (10 hours = 600 minutes. 600 ÷ 20 = 30 doublings. 2³⁰ = about 1 billion.)
Key idea: Bacteria reproduce by binary fission — one cell splits into two every 20 minutes. This exponential growth starts deceptively slow, then accelerates explosively. Understanding exponential growth is essential for understanding both infections and antibiotic resistance.
Bacteria are surrounded by a rigid cell wall — a mesh-like structure made of a molecule called peptidoglycan. This wall is essential: bacteria maintain an internal pressure of about 5 atmospheres (five times the air pressure around you). Without the wall, they would burst like an over-inflated balloon.
Penicillin attacks this wall. Specifically, it mimics one of the building blocks of peptidoglycan and binds to the enzyme (transpeptidase) that cross-links the wall during construction. With penicillin blocking the cross-linker, new wall sections are weak and full of gaps. As the bacterium grows and divides, the old wall stretches, the new sections fail, and the internal pressure bursts through. Pop.
But here's the key: human cells don't have cell walls. Our cells are held together by a flexible membrane, not a rigid peptidoglycan cage. Penicillin has nothing to attack in human cells — it's like a key that only fits bacterial locks. This is why you can take penicillin without it harming your own cells.
This principle — a drug that attacks a feature unique to the pathogen and absent from the host — is the foundation of all antibiotic design. It's called selective toxicity.
Think about it: Penicillin only works on bacteria that are actively growing and dividing — because it blocks new wall construction. Dormant bacteria (not dividing) aren't building new wall, so penicillin can't harm them. Why does this matter for treatment?
Key idea: Penicillin kills bacteria by blocking cell wall construction. Without a complete wall, the bacterium's internal pressure bursts it open. Human cells lack cell walls, so penicillin is harmless to us — this selective toxicity is the basis of antibiotic medicine.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
In a population of a billion bacteria, most are identical. But a few — perhaps one in a million — have a random **mutation** that gives them slight re...
Fleming discovered penicillin in 1928. But the first patient wasn't treated until 1941 — a **13-year gap**. Why? Because making enough penicillin to t...