# https://news.ycombinator.com/item?id=20127987 import os import random import sys os.system("clear") print "Hello there. I'm a computer. What's your name?" G = raw_input() print "Hello " + G + ". You are welcome to computer land." while True: print "" print "What would you like to do today?" print "1) Say something random" print "2) Make a maze" print "3) Exit" print "Enter your selection" S = raw_input() if S == "1": F = open("/usr/share/dict/words").readlines() W = random.choice(F) os.system("say {}".format(W)) elif S == "2": for i in range(1, 3000): if random.random()>0.5: sys.stdout.write("/") else: sys.stdout.write("\\") elif S == "3": print "Bye." exit() else: print "Try again."