In this version of the song “Ninety-Nine Bottles,” the program introduces small imperfections in each stanza by either removing a letter, swapping the casing of a letter, transposing two letters, or doubling a letter.
As the song continues to play, these mutations add up, resulting in a very silly song. It’s a good idea to try Project 50, “Ninety-Nine Bottles,” before attempting this one.
The Program in Action
When you run ninetyninebottles2.py, the output will look like this:
niNety-nniinE BoOttels, by Al Sweigart firstname.lastname@example.org --snip-- 99 bottles of milk on the wall, 99 bottles of milk, Take one down, ...