Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the hint they gave was this function modifies the original list and does not return anything. We also need to take into account when we

the hint they gave was this function modifies the original list and does not return anything. We also need to take into account when we send an empty dictionary.

def letter_grades(adict): """ Modifies the new dictionary to replace numerical grades with letter grades. 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 replaces all of the numerical grades with 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: If a = {'wmw2' : 55, 'abc3' : 90, 'jms45': 86}, letter_grades(a) changes a to {'wmw2' : 'F, 'abc3' : 'A', 'jms45': 'B'}. If a = {} letter_grades(a) changes a to {} 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

Step: 3

blur-text-image

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

=+ What topics are contained in the contracts?

Answered: 1 week ago

Question

=+Are they specific or general in nature?

Answered: 1 week ago