Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! -*- coding: utf-8 -*-
- def sing(self):
- bottles = reversed(range(100))
- for i in bottles:
- if i > 1:
- a = ""
- a += str(i) + " bottles of beer on the wall, " + str(i) + " bottles of beer."
- a += "\n" + "Take one down, pass it around you've got " + str(i-1) + " bottles of beer on the wall"
- print(a) # TODO: Maybe add a linebreak after 'a' to separate the verses
- print "\n"
- elif i > 0:
- b = ""
- b += "1 more bottle of beer on the wall, 1 more bottle of beer."
- b += "\n" + "Take one down, pass it around you've got no more bottles of beer on the wall"
- print b
- print "\n"
- else:
- c = ""
- c += "No more bottles of beer on the wall, no more bottles of beer."
- c += "\n" + "Go to the store, buy some more, 99 bottles of beer on the wall."
- print c
- break
- if __name__ == '__main__':
- song = BottlesOfBeer()
- song.sing()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement