Answer to Question #298676 in Python for Sudheer

Question #298676

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

1
Expert's answer
2022-02-16T13:24:33-0500
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")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS