Please suggest any modification to this code
So I was recently working on a student database management system. However, I'm having two problems with the code I have written: 1. I'm not able to extract the percentage from d.values() 2. When I enter the choice a third time, the code stops working Please ignore the fact that I didn't put the codes for if(x==4) and if(x==5) import collections def studentmanagement(): print("[Choice 1: Accept details of the students ]\n") print("[Choice 2: Search details of a particular student on the basis of allottee number and display result ]\n") print("[Choice 3: Display the result of all the students ]\n") print("[Choice 4: Find the topper(s) amongst the students ]\n") print("[Choice 5: Find the grade of the students ]\n") print("[Choice 6: Exit ]\n") x = int(input("Enter a choice: ")) if(x==1): n=int(input("Enter the number of students(n):")) print("Enter the details of the students in the following format:allottee no. name, percentage:") d = dict(input().split(' ') for i in range(n)) print("Details accepted successfully!") x = int(input("Enter a choice: ")) if(x==2): y=input("Enter the allottee number of the student:") if y in d.keys(): print(d.get(y)) x = int(input("Enter a choice: ")) else: print("This allottee number is not present in the database") x = int(input("Enter a choice: ")) if(x==3): print("Raw database:") print(d) l=d.values() res = [(a, b) for a, b in zip(*d.values()) if a.isdigit()] # printing result print("The Percentages scored by the students : " + str(res)) x = int(input("Enter a choice: ")) if(x==6): print("Thank you") studentmanagement()