'''menu.py -- a simple menu-driven program Jeff Ondich, 12 Sep 2007 This program prints a menu, gets a selection from the user, and performs the desired action. ''' import random print 'A. Tell me a joke' print 'B. Sing me a song' print 'C. Give me a random number from 1 to 10' print response = raw_input('Your choice? ') if response == 'A': print 'Why is 6 afraid of 7?' print 'Because 7, 8, 9.' elif response == 'B': print 'Oh Danny boy, the pipes the pipes are calling...' elif response == 'C': print 'Here you go:', random.randint(1, 10) else: print 'Please choose A, B, or C next time'