Created
July 11, 2013 17:03
-
-
Save robrocker7/5977252 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(""" | |
Welcome to the Menu Generator 3000! | |
To view your current menu('s), enter 'View' | |
To create a new menu, enter 'New' | |
To exit the Menu Generator 3000, enter 'Exit' | |
""") | |
def new_menu(x): | |
print("you may create 5 items in your menu...") | |
count = 5 | |
x={} | |
while count != 0: | |
key, value = raw_input('Name Item #{0}: '.format(count)), \ | |
raw_input('Enter Item #{0} Value: '.format(count)) | |
x[key] = value | |
count = count -1 | |
print(x) | |
return True | |
def view_menu(): | |
print("have not gotten this far..") | |
return False | |
var = True | |
while var == True: | |
command = raw_input() | |
command = command.lower() | |
if command == 'new': | |
print("you typed new!") | |
y = raw_input("Name your menu:") | |
var = new_menu(y) | |
elif command == 'view': | |
var = view_menu() | |
elif command == "exit": | |
print("you typed exit!") | |
break | |
else: | |
print("That is not a valid command!") | |
print("End of program!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment