write a python function Find_Min_Max(A) (Refer RollNo_W9B_2.py ) which takes a dictionary as input parameter and return the name of student pair having minimum and maximum marks in the class
def Find_Min_Max(A):
'''
function takes a dictionary as input
parameterand return the name of
student pair having minimum and maximum marks
'''
names = sorted(A, key=A.get)
return names[0], names[-1]
test = {"John":59, "Kira":99, "Michael":90}
print(*Find_Min_Max(test),sep="\n")
Comments
Leave a comment