Week 10
Source Code
import random
def main():
done = False
while not done:
print("Menu System")
print("E1 - Example 1")
print("P1 - Problem 1")
print("Q - Quit")
choice = input("Choice: ").upper()
if choice == "E1":
print("Example 1")
# example1 function call
elif choice == "E2":
print("Example 2")
# example2 function call
elif choice == "E3":
print("Example 3")
# example3 function call
elif choice == "E4":
print("Example 4")
# example4 function call
elif choice == "E5":
print("Example 5")
# example5 function call
elif choice == "E6":
print("Example 6")
# example6 function call
elif choice == "P1":
print("Problem 1")
# problem1 function call
elif choice == "P2":
print("Problem 2")
# problem2 function call
elif choice == "P3":
print("Problem 3")
# problem3 function call
elif choice == "P4":
print("Problem 4")
# problem4 function call
elif choice == "P5":
print("Problem 5")
# problem5 function call
elif choice == "P6":
print("Problem 6")
# problem6 function call
elif choice == "Q":
print("Quitting!")
done = True
else:
print("Invalid choice")
# example1 function definition
# example2 function definition
# example3 function definition
# example4 function definition
# example5 function definition
# example6 function definition
# problem1 function definition
# problem2 function definition
# problem3 function definition
# problem4 function definition
# problem5 function definition
# problem6 function definition
# call the main function, do not delete!
main()
Last updated