Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Mon Apr 10 13:29:11 2017
- Beer Song
- @author: phillip
- """
- from time import sleep
- def typew(words):
- for char in words:
- sleep(0.05)
- print(char,sep='',end='')
- word = "bottles"
- for beer_num in range(99, 0, -1):
- typew(" ".join([str(beer_num), word, "of beer on the wall..","\r\n"]))
- typew(" ".join([str(beer_num), word, "of beer.","\r\n"]))
- typew("Take one down..\r\n")
- typew("Pass it around.\r\n")
- if beer_num == 1:
- typew("No more bottles of beer on the wall!")
- else:
- new_num = beer_num -1
- if new_num == 1:
- word = "bottle"
- typew(" ".join([str(new_num), word, "of beer on the wall.\r\n\r\n"]))
Advertisement
Add Comment
Please, Sign In to add comment