Question: Write a function combined_cases (day1_cases, day2_cases) which take in two input parameters which are two dictionaries that represent the COVID-19 cases on one specific day

 Write a function combined_cases (day1_cases, day2_cases) which take in two input

Write a function combined_cases (day1_cases, day2_cases) which take in two input parameters which are two dictionaries that represent the COVID-19 cases on one specific day in different states in the USA. Your function should return a dictionary that contains the sum of the cases of the two days in the given states. For example: If the following two dictionaries are given as input: day1_cases = {'Texas': 10678, 'Florida': 7459, 'Illinois': 12601} day2_cases = {'Texas': 13379, 'Florida': 7925, 'Illinois': 11301} Then your function must return: {'Texas': 24057, 'Florida': 15384, 'Illinois': 23902} Sample Input: {'California': 10577, 'New York': 5167} {'California': 11835, 'New York': 5364} Sample Output: {'California': 22412, New York': 10531}

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!