Activity 2.32
Source Code
import math
import random
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 == "E2":
example2()
elif choice == "E3":
example3()
elif choice == "P1":
problem1()
elif choice == "P2":
problem2()
elif choice == "P3":
problem3()
elif choice == "P4":
problem4()
elif choice == "P5":
problem5()
elif choice == "P6":
problem6()
elif choice == "Q":
print("Quitting!")
done = True
else:
print("Invalid choice")
# example1 function definition
def example1():
pass # remove
# example2 function definition
def example2():
pass # remove
# example3 function definition
def example3():
pass # remove
# problem1
def problem1():
print("Problem 1")
# problem2
def problem2():
print("Problem 2")
# problem3
def problem3():
print("Problem 3")
# problem4
def problem4():
print("Problem 4")
# problem5
def problem5():
print("Problem 5")
# problem6
def problem6():
print("Problem 6")
# call the main function, do not delete!
main()
grades.txt
90
80
100
70
60
popular_games.txt
Hogwarts Legacy
Baldur's Gate 3
The Legend of Zelda
Starfield
Diablo IV
by_month.txt
January
February
March
April
May
Last updated