Activity 2.35
Source Code
import math
import random
import csv
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 == "Q":
print("Quitting!")
done = True
else:
print("Invalid choice")
# define Example 1 Function
def example1():
print("Example 1")
# version 1
# version 2
# print characters and length
# define Example 2 Function
def example2():
print("Example 2")
# uppercase
# lowercase
# split
# starts or ends
# define Example 3 Function
def example3():
print("Example 3")
# 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")
# call the main function, do not delete!
main()
employees235.csv
Full Name,Department,Title,Location
" John Smith ",Engineering,"Senior Engineer"," New York "
"Jane Doe ",Engineering,"Intern","Los Angeles "
"Alice Wonderland",Operations," Manager"," Seattle"
" bob Stone "," marketing ","Social Media Manager","San Francisco "
students235.csv
ID,Name,Grade,City
" S001 "," Linda Brown "," A "," new York "
" S002 ","MARK JONES","B "," LOS ANGELES"
"S003"," Lucy Liu "," A "," Chicago "
" S004 "," DanSimpson ","C"," boston "
Last updated