Код: Выделить всё
# Function to display the main menu
def main_menu():
while True:
print("\nMain Menu:")
print("1 - Record Pupil Information")
print("2 - Water Safety Quiz")
print("3 - Reaction Test")
print("4 - Reports")
print("5 - Exit")
selection = input("\nPlease select an option (1-5): ")
if selection == "1":
record_pupil_info()
elif selection == "2":
water_safety_quiz()
elif selection == "3":
reaction_test()
elif selection == "4":
view_reports()
elif selection == "5":
print("Exiting the system. Goodbye!")
break
else:
print("Invalid selection. Please choose a valid option.")
Подробнее здесь: https://stackoverflow.com/questions/790 ... eacher-has