Question: Exercise 1 Write a function called print_dictionary that takes a dictionary as its single parameter. This function will then print the dictionary to screen. To

 Exercise 1 Write a function called print_dictionary that takes a dictionary

Exercise 1 Write a function called print_dictionary that takes a dictionary as its single parameter. This function will then print the dictionary to screen. To do this, it will print each entry on its own line as follows: , , key, Exercise 2 Write a function called generate_squares that takes a single integer parameter n. This function will then create and return a dictionary with the entries x, x*x for all x from 0 up to and including n. Call your function for a few different numbers and print what is returned to screen using your print_dictionary function. Exercise 3 Write a function called merge that takes two dictionaries as parameters. This function will create a new dictionary that contains everything from the two input dictionaries and return it. For this problem you can assume that the input dictionaries do not have any keys in common. Create a few dictionaries, print them to screen using the function created above. After this, merge them using the function you wrote and print the result to screen Sample input dl- { 'a' : 100, 'c' :300) d2-'b':200, 'd':400)

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!