Created
March 7, 2015 08:59
-
-
Save manueldev/6febd57044c125ae30f3 to your computer and use it in GitHub Desktop.
99 Bottles of Beer, python. Ejercicio para https://www.youtube.com/watch?v=78--cqLH50Y&feature=youtube_gdata
This file contains 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
bottles = 99 | |
while bottles > 1: | |
print "%d bottles of beer on the wall, %d bottles of beer.\nTake one down and pass it around, %d bottles of beer on the wall.\n" % (bottles, bottles, bottles-1) | |
bottles -= 1 | |
print "1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment