Mid2 28th_Student_Percentage_Lookup
entries=int(input("Enter the no, of entries: "))
d={}
for i in range(entries):
student_name=input("Enter the student name: ")
student_marks=int(input("Enter the percentage: "))
d[student_name]=student_marks
user=input("Enter the student name: ").lower()
print(d[user])
#output:
Enter the no. of entries: 2
Enter the student name: ubed
Enter the percentage: 12
Enter the student name: rounak
Enter the percentage: 13
Enter the student name: ubed
12
Comments
Post a Comment