Activity 2.6
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")
contacts = {
'Alice': '201-555-0101',
'Bob': '201-555-0102',
'Carol': '201-555-0103',
'David': '201-555-0104',
'Emma': '201-555-0105',
}
# Print the Names and Phone Numbers
# delete Alice
# delete Bob
# ask the user who to delete
# 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