Students=['student1','student2','student3','student4','student5','student6','student7','student8','student9','student10']
Marks = [45, 78, 12, 14, 48, 43, 47, 98, 35, 80]
def display_dash_board(students, marks):
dictionary = dict(zip(Students,Marks))
# write code for computing top top 5 students
print("Top 5 Students are :\n\n")
for key, value in sorted(dictionary.items(), key=lambda item: item[1],reverse=True)[:5]:
print("%s: %s" % (key, value))
# write code for computing top least 5 students
print("\n\n Top Least 5 Students are : \n\n")
for key, value in sorted(dictionary.items(), key=lambda item: item[1])[:5]:
print("%s: %s" % (key, value))
# write code for students within 25 to 75 percentile
print("\n\n Students in 25-75 percentile range are : \n\n")
For Calculating percentile use:-
max = max_mark
min = min_mark
diff = max - min
pre_25 = diff*0.25
pre_75 = diff*0.75
display_dash_board(Students, Marks)