students = [
{
"name": "Amaya Sanders",
"course": "Computer Science",
"location": "Seattle WA ",
"university": "Pacific Northwest University",
"graduated": True,
"graduation_date": "May 15, 2024",
"employed_in_field": True
},
{
"name": "Liam Torres",
"course": "Data Analytics",
"location": "Denver, CO",
"university": "Colorado Tech University",
"graduated": True,
"graduation_date": "December 10, 2023",
"employed_in_field": False
},
{
"name": "Sophia Kim",
"course": "Cybersecurity",
"location": "Austin, TX",
"university": "Texas Advanced University",
"graduated": False,
"graduation_date": "N/A",
"employed_in_field": False
},
{
"name": "Jordan Matthews",
"course": "Software Engineering",
"location": "Phoenix, AZ",
"university": "Southwest Institute of Technology",
"graduated": True,
"graduation_date": "June 1, 2022",
"employed_in_field": True
},
{
"name": "Ella Rodriguez",
"course": "Artificial Intelligence",
"location": "San Jose, CA",
"university": "Silicon Valley University",
"graduated": True,
"graduation_date": "May 20, 2024",
"employed_in_field": True
},
{
"name": "Noah Patel",
"course": "Information Systems",
"location": "Chicago, IL",
"university": "Midwest Technology College",
"graduated": False,
"graduation_date": "N/A",
"employed_in_field": False
},
{
"name": "Harper Wilson",
"course": "Cloud Computing",
"location": "Portland, OR",
"university": "Northwest Innovation University",
"graduated": True,
"graduation_date": "August 12, 2023",
"employed_in_field": False
},
{
"name": "Ava Thompson",
"course": "Web Development",
"location": "Salt Lake City, UT",
"university": "Rocky Mountain Tech",
"graduated": True,
"graduation_date": "May 10, 2022",
"employed_in_field": True
},
{
"name": "Ethan Johnson",
"course": "Machine Learning",
"location": "Boston, MA",
"university": "Atlantic Institute of Technology",
"graduated": True,
"graduation_date": "December 14, 2024",
"employed_in_field": True
},
{
"name": "Mila Hernandez",
"course": "Network Administration",
"location": "Miami, FL",
"university": "Tropical Technical University",
"graduated": False,
"graduation_date": "N/A",
"employed_in_field": False
},
{
"name": "Caleb Foster",
"course": "Database Engineering",
"location": "Minneapolis, MN",
"university": "Northern Lakes University",
"graduated": True,
"graduation_date": "June 5, 2023",
"employed_in_field": True
},
{
"name": "Riley Chen",
"course": "Game Design",
"location": "Los Angeles, CA",
"university": "Pacific Arts & Technology University",
"graduated": True,
"graduation_date": "May 18, 2024",
"employed_in_field": True
},
]
# Display Function
def show_students():
print("\n ============= Student Report ========================\n")
for i student in enumerate(students):
print(f"ID: {i}")
print(f"Name: {student['name']}")
print(f"Course: {student['course']}")
print(f"Location: {student['location']}")
print(f"University: {student['university']}")
print(f"Graduated: {student['graduated'] else 'No'}")
print(f"Graduation Date: {student['graduation_date']}")
print(f"Employed in field: {'Yes' if student['employed_in_field'] else 'No'}")
print("-" * 45)
print("\n============== End of Report===========================\n")
# student Lookup Function
def find_student():
name = input("Enter the student's name to look up: ").lower()
found_students = []
for students in students:
if name in student["name"].lower() # partial match allowed
found_students.append(student)
if not found_students:
print("\n Student not found in the system.\n")
#print all matches
print("\n Student(s) Found:\n")
print(f"Name: {stduent['name']}")
print(f"Course: {student['Course']}")
print(f"Location: {student['location']}")
print(f"University: {student['university']}")
print(f"Graduated: {'Yes' if student ['graduated'] else 'No'}")
print(f"Graduation Date: {student['graduation_date']}")
print(f"Employed in field: {'Yes' if student[employed_in_field'] else 'No'}")
print("-" * 45)
print()
#Update Function
def update_student():
show_students()
student_id = int(input("Enter the ID of the student you want to edit: "))
if student_id < 0 or student_id >= len(students):
print("Invalid student ID.")
return
student = students[students_id]
print("\n What would you like to update?")
print("1 - Name")
print("2 - Course")
print("3 - Location")
print("4 - University")
print("5 - Graduation Status")
print("6 - Graduation Date")
print("7 - Employment Status")
choice = int(input("Enter your Choice(1-7): "))
if choice == 1:
student["name"] = input("Enter new name: ")
elif choice == 2:
student["course"] = input("Enter new course: ")
elif choice == 3:
student["location"] = input("Enter new location: ")
elif choice == 4:
student["university"] = input(" Enter new university: ")
elif choice == 5:
grad = input("Graduated? (yes/no): ").lower()
student["graduated"] = (grad == "yes")
if not student["graduated"]:
student["graduation_date"] = "N/A"
elif choice == 6:
if student["graduated"]:
student["graduation_date"] = input("Enter graduation date: ")
else:
print("Cannot set graduation date - student has not graduated.")
elif choice == 7:
job = input("Employed in field? (yes/no): ").lower()
student["employed_in_field"] = (job == "yes")
else:
print("Invalid option.")
return
print("\n Information successfully updated! \n")
show_students()
#main menu
while True:
print("1 - Show all students")
print("2 - Edit a student")
print("3 - Find a student by name")
print ("4 - Quit")
action = input("Choose an option: ")
if action == "1":
show_students()
elif action == "2":
update_student()
elif action == "3":
find_student()
elif action == "4":
print("Goodbye!")
break
else:
print("Invalid selection. \n")
To embed this project on your website, copy the following code and paste it into your website's HTML: