# sing # # this silly function is given an integer value and prints the verse of # "99 Bottles of Beer" that begins with that number # def sing(number): start = str(number) end = str(number-1) print "\n" + start + " bottles of beer on the wall, " print start + " bottles of beer." print "Take one down, and pass it around, " print end + " bottles of beer on the wall. " # control # # This function asks the user to enter a number to start singing # the song, and then calls the function repeatedly until # the number zero is reached (or the user kills the process!) # def control(): print "Let's sing '999 bottles!\n" verseNumber = input("Enter the verse you want to start on>> ") for verse in range (verseNumber, 0, -1): sing(verse) print "\n\n Ta-dah!" control()