Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 . Implement letter _ grades Read the specification of the function letter _ grades in the module funcs. Implement this function according to its

4. Implement letter_grades
Read the specification of the function letter_grades in the module funcs. Implement this function according to its specification. Once again, the inputs to this function must be dictionaries that have netids as keys and numbers as values. Look at the test cases in tests.py if you are unsure.
When you have implemented the function, test your answer with the test script. You should now pass all tests.
def letter_grades(adict):
"""
Returns a new dictionary with the letter grades for each student.
The dictionary adict has netids for keys and numbers 0-100 for values. These
represent the grades that the students got on the exam. This function returns a
new dictionary with netids for keys and letter grades (strings) for values.
Our cut-off is 90 for an A,80 for a B,70 for a C,60 for a D. Anything below 60
is an F.
Examples:
letter_grades({'wmw2' : 55, 'abc3' : 90,'jms45': 86}) returns
{'wmw2' : 'F, 'abc3' : 'A','jms45': 'B'}.
letter_grades({}) returns {}
Parameter adict: the dictionary of grades
Precondition: adict is dictionary mapping strings to ints
"""
pass

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago