Activity 1.22
Source Code
import random
def main():
done = False
while not done:
print("Menu System")
print("E1 - Example 1")
print("E2 - Example 2")
print("P1 - Problem 1")
print("P2 - Problem 2")
print("P3 - Problem 3")
choice = input("Choice: ")
if choice == "E2":
print("Example 1")
# add code here
elif choice == "E2":
print("Example 2")
# add code here
elif choice == "P1":
print("Problem 1")
# add code here
elif choice == "P2":
print("Problem 2")
# add code here
elif choice == "P3":
print("Problem 3")
# add code here
else:
print("Invali choice")
# example1 function definition
def example1():
print("Programs must be written for people to read,")
print("and only incidentally for machines to execute.")
print("-- Hal Abelson")
# problem1 function definition
# problem 2 function definition
# problem 3 function definition
# call the main function, do not delete!
main()
Last updated