{}
run-icon
main.py
students = [] while True: print("Student Progress Tracker") print("1. Add Student") print("2. View Student Progress Report") print("3. Exit") options = input("Choose an option - 1-3: ") if options == "1": subject = input("What subject would you like to track?: ") name = input("What is the name of the student?: ") score = int(input("What is the score that you would/will give the student? 1-100: ")) if score <= 50: pass_fail = "Fail" else: pass_fail = "Pass" student = { "subject": subject, "name": name, "score": score, "grade": pass_fail } students.append(student) print(name + " added successfully!") elif options == "2": print("Student Progress Report") if not students: print("No students added yet.") else: for student in students: print(f"Subject: {student['subject']} | Name: {student['name']} | Score: {student['score']} | Status: {student['grade']}") elif options == "3": print("Goodbye. Remember to save the progress.") break else: print("Not valid. Please choose 1, 2, or 3.")
Output