Activity 2.10
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")
# create an empty set
# add elements
# add multiple elements
# print using a for loop
# remove an element
# print set1
# problem1
def problem1():
pass
# problem2
def problem2():
pass
# problem3
def problem3():
pass
# problem4
def problem4():
pass
# call the main function, do not delete!
main()
Last updated