Question: Python 99 Bottles 99 Bottles is a traditional song for long road trips. The same verse is repeated, each time with fewer bottles, until the
Python
99 Bottles "99 Bottles" is a traditional song for long road trips. The same verse is repeated, each time with fewer bottles, until the singer reaches zero.
Help me with a program that prints out all the verses to "99 Bottles". The choice of beverage is up to you: Traditionally it is sung as bottles of beer on the wall. Changing it to bottles of soda or water on the wall would be fine if you would prefer. Note how the last two verses will read "1 bottle" and not "1 bottles", and "No more bottles" instead of "0 bottles". Accept a command-line argument to the program that is the starting number of bottles on the wall. If no command line argument is supplied the program should default to a value of 99 for the starting number of bottles. The file name should be named the exact same as your login name followed with "_bottles.py". For example if your name is Samuel Adams then your login name is probably "samuela", the full file name should be: samuela_bottles.py. The file should be placed in your submit directory located in your home directory on the VM. Sample Output: 99 bottles of beer on the wall! 99 bottles of beer! Take one down And pass it around 98 bottles of beer on the wall! 98 bottles of beer on the wall! 98 bottles of beer! Take one down And pass it around 97 bottles of beer on the wall! . . . 2 bottles of beer on the wall! 2 bottles of beer! Take one down And pass it around 1 bottle of beer on the wall! 1 bottle of beer on the wall! 1 bottle of beer! Take one down And pass it around No more bottles of beer on the wall
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
