Activity 2.13
Source Code
def main():
done = False
while not done:
print("Menu System")
print("E1 - Example 1")
print("Q - Quit")
choice = input("Choice: ").upper()
if choice == "E1":
example1()
elif choice == "P1":
problem1()
elif choice == "P2":
problem2()
elif choice == "P3":
problem3()
elif choice == "P4":
problem4()
elif choice == "Q":
print("Quitting!")
done = True
else:
print("Invalid choice")
# example1 function definition
def example1():
print("Example 1")
# example2 function definition
def example2():
print("Example 2")
# problem1
def problem1():
print("Problem 1")
# problem2
def problem2():
print("Problem 2")
# problem3
def problem3():
print("Problem 3")
# problem4
def problem4():
print("Problem 4")
# call the main function, do not delete!
main()
Last updated