Advertisement
okelikai

Bottles on the Wall

May 25th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import time
  2. def bottles_on_wall(bottles):
  3. if bottles > 0:
  4. print "%s bottles of pop on the wall" % bottles
  5. time.sleep(1)
  6. print "%s bottles of pop" % bottles
  7. time.sleep(1)
  8. print "If one of those bottles should happen to fall,"
  9. time.sleep(3)
  10. bottles = bottles - 1
  11. print "%s bottles of pop on the wall. \n" % bottles
  12. time.sleep(1)
  13. bottles_on_wall(bottles)
  14. elif bottles == 0:
  15. print "And now we're all drunk on pop."
  16. return
  17.  
  18. bottles_on_wall(99)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement