Question: 2 . 4 Map Scores to Grades For all further problems please use the dictionary averages listed below: averages = { Alice: 8 4 .

2.4 Map Scores to Grades
For all further problems please use the dictionary averages listed below:
averages ={ "Alice": 84.33, "Bob": 83.33, "Charlie": 83.33, "David": 97.67}
Write a function map_scores_to_grades that maps each students average score to a letter grade (A, B, C, D, or F). Use the map() function with a lambda function.
Grading system:
90 and above: A
80 to 89: B
70 to 79: C
60 to 69: D
Below 60: F
Hint: The map() function applies a given function to all items in the list or dictionary.
Use a lambda function inside map() to convert each students average into a letter grade.
To apply the map() function to a dictionary, you can use averages.items() to get key-value pairs (student, average).
def map_scores_to_grades(averages):
# Add your code here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!