Question: # dra-histogram ( ) w histogram() function which is passed a Python dictionary as a parameter. The keys of the dictionary are single letters an

 # dra"-histogram ( ) w histogram() function which is passed a
Python dictionary as a parameter. The keys of the dictionary are single

# dra"-histogram ( ) w histogram() function which is passed a Python dictionary as a parameter. The keys of the dictionary are single letters an corresponding values are integers, e.g..('b': 5, 'a' 6, 3). For eac key:value pair in the dictionary the function prints a series of stars folloved by a space, followed by the key. The number of stars print given by the value corresponding to the key. The keys are printed in alphabetical order. Note that the key is not printed if the corresponding value is a number less than 1. For example, the following code: print("1. draw histogram('a' 2, 'c' 7, 'b': 5) print) print( "2 . " ) draw-histogram( {'a': o, 'c': 5, 'b': 7, 'f': -1)) prints: * b def draw_histogram (histogram_dict) pass

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 Databases Questions!