The first computer "bug" was a real moth
On September 9, 1947, the team working on the Harvard Mark II computer found out why their machine was misbehaving: a moth was stuck in one of its relays.
They removed it, taped it into the logbook, and wrote next to it:
First actual case of bug being found.
The joke is in the word actual: engineers were already calling mysterious problems "bugs" (Thomas Edison used the word in the 1870s!). But this moth made the story famous, and computer scientist Grace Hopper, who worked on that machine, loved telling it.
The logbook page, moth included, is kept today at the Smithsonian National Museum of American History in Washington.
That's also why fixing mistakes in code is called debugging. Here's a bug for you to find. This program should print the numbers from 1 to 5, but something is wrong:
for i in range(1, 5):
print(i)
▶ Try it