Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bobotw = " bottles of beer on the wall"
- bob = " bottles of beer."
- take = "Take one down and pass it around, "
- beer = 99
- def on_wall(beer):
- while beer >= 0:
- if beer == 0:
- print("No more" + bobotw + ", no more" + bob)
- print("Go to the store and buy some more, 99" + bobotw + ".")
- return
- elif beer == 1:
- print(str(beer) + " bottle of beer on the wall, " + str(beer) + " bottle of beer.")
- beer -= 1
- print(take + "no more" + bobotw + ".")
- elif beer == 2:
- print(str(beer) + bobotw + ", " + str(beer) + bob)
- beer -= 1
- print(take + "only one bottle of beer on the wall.")
- else:
- print(str(beer) + bobotw + ", " + str(beer) + bob)
- beer -= 1
- print(take + str(beer) + bobotw + ".")
- answer = input("Do you want to see the Bottles of Beer song? (y/n) : ")
- if answer.lower() == "y":
- on_wall(beer)
- elif answer.lower() == "n":
- print("Bollocks to ya then.")
- else:
- print("It's y for yes, n for no.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement