Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def mainMenu():
- print("1. option 1")
- print("2. option 2")
- print("3. Quit")
- try:
- selection=int(input("Enter choice: "))
- if selection==1:
- option1()
- elif selection==2:
- option2()
- elif selection==3:
- exit
- else:
- print("Invalid choice. Enter 1-3")
- mainMenu()
- except ValueError:
- print("Invalid choice. Enter 1-3")
- def option1():
- print("test 1")
- mainMenu()
- def option2():
- print("test 2")
- mainMenu()
- def exit():
- print("test 3")
- mainMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement