Created
March 7, 2010 10:21
-
-
Save rcampbell/324297 to your computer and use it in GitHub Desktop.
Code Golf - 99 Bottles Of Beer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "\n\n".join(["%d %s of beer on the wall, %d %s of beer.\n%s"%(i,i>1 and"bottles"or"bottle",i,i>1 and"bottles"or"bottle",i-1==0 and"Go to the store and buy some more, 99 bottles of beer on the wall."or"Take one down and pass it around, %d %s of beer on the wall."%(i-1,i-1>1 and"bottles"or"bottle"))for i in reversed(range(1,100))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment