Skip to content

Instantly share code, notes, and snippets.

@manueldev
Created March 7, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manueldev/6febd57044c125ae30f3 to your computer and use it in GitHub Desktop.
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
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