Skip to content

Instantly share code, notes, and snippets.

View gsiegman's full-sized avatar

Glenn Siegman gsiegman

  • Wisconsin
  • 12:47 (UTC -05:00)
View GitHub Profile
@gsiegman
gsiegman / 99bottles
Created November 25, 2011 22:01
99 Bottles of Beer on the Wall
import os
"""OS X only"""
def sing():
for i in range(0, 99):
num = 99 - i
os.system("say %s bottles of beer on the wall, %s bottles of beer, if one of those bottles should happen to fall, %s bottles of beer on the wall" % (num, num, num-1))
if __name__ == '__main__':
phone_char_mappings = {
'A': '2', 'B': '2', 'C': '2',
'D': '3', 'E': '3', 'F': '3',
'G': '4', 'H': '4', 'I': '4',
'J': '5', 'K': '5', 'L': '5',
'M': '6', 'N': '6', 'O': '6',
'P': '7', 'R': '7', 'S': '7',
'T': '8', 'U': '8', 'V': '8',
'W': '9', 'X': '9', 'Y': '9',
'1': '1', '2': '2', '3': '3',