SHARE
TWEET

99 Bottles Of Beer

Phr0zen_Penguin Sep 19th, 2014 150 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. #!C:\Python\python.exe
  4. ##
  5. ## NOTE:
  6. ## Python 2.x/3.x compatible
  7. ## Your bang path on Windows may vary (depending on where you installed your Python 2.x/3.x binaries).
  8. ##
  9. ####
  10. ## [99_bottles.py]
  11. ##
  12. ## 99 Bottles Of Beer Lyrics.
  13. ##
  14. ## (c) Damion 'Phr0z3n.dev' Tapper, 2014.
  15. ## Email: Phr0z3n.Dev@Gmail.com
  16. ####
  17.  
  18. print(">>------------------> 99 Bottles Of Beer Lyrics <------------------<<\n")
  19.  
  20. bottles_of_beer = 99
  21. beer_buffer = ""
  22.  
  23. while bottles_of_beer:
  24.         beer_buffer = "{0} bottle{1}".format(bottles_of_beer, "s" if bottles_of_beer != 1 else "") +\
  25.         " of beer on the wall, {0} bottle{1}".format(bottles_of_beer, "s" if bottles_of_beer != 1 else "") + " of beer." +\
  26.         "\nTake one down and pass it around, " +\
  27.         "{0} bottle{1}".format((bottles_of_beer - 1) if ((bottles_of_beer -1) != 0) else "no more", "s" if (bottles_of_beer - 1) != 1 else "") +\
  28.         " of beer on the wall.\n"
  29.  
  30.         print(beer_buffer)
  31.         bottles_of_beer -= 1
  32.  
  33. print("No more bottles of beer on the wall, no more bottles of beer.")
  34. print("Go to the store and buy some more, 99 bottles of beer on the wall\n")
  35.  
  36. print(">>-------------------------------> + <-------------------------------<<")
RAW Paste Data
Top