Source Code
session4.py
firstName = "" # add your name here
print("Session 4 - " + firstName)
# Example 1
# Example 2
# Example 3
# Example 4
# Example 5
# Example 6session4v2.py
Last updated
firstName = "" # add your name here
print("Session 4 - " + firstName)
# Example 1
# Example 2
# Example 3
# Example 4
# Example 5
# Example 6Last updated
import random
import math
def main():
print("Main Function")
print("E1 - Example 1")
print("E2 - Example 2")
print("E3 - Example 3")
print("Q - Quit")
choice = input("Choice: ").upper()
if choice == "E1":
print("Example 1")
# example1 function call
elif choice == "E2":
print("Example 2")
# function calls
elif choice == "E3":
print("Example 3")
# example3 function call
elif choice == "E4":
print("Example 4")
# example4 function call
elif choice == "E5":
print("Example 5")
# example5 function call
elif choice == "E6":
print("Example 6")
# example6 function call
elif choice == "E7":
print("Example 7")
# example7 function call
elif choice == "Q":
print("Quitting!")
else:
print("Invalid choice")
# example1 function definition
# example3 function definition
# example4 function definition
# example5 function definition
# example6 function definition
# example7 function definition
# call the main function, do not delete!
main()