Question: 'Candidate 1 [2, 5], 'Candidate 2: [3, 2], Candidate 3 [0, 9, 7], 'C andidate 4': [9, 6, 4] It contains a function calculate_results that
!['Candidate 1 [2, 5], 'Candidate 2": [3, 2], "Candidate 3 [0,](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66dead639eaa2_41166dead6325078.jpg)
'Candidate 1 [2, 5], 'Candidate 2": [3, 2], "Candidate 3 [0, 9, 7], 'C andidate 4': [9, 6, 4] It contains a function calculate_results that takes one argument (a dictionary as returned by read_scores) and returns a dictionary where each key is a candidate and each value is a float which is the average of the scores assigned to that candidate o If the argument to this function were the dictionary above, the resulting dictionary would be 'Candidate 1': 3.5, 'Candidate 2": 2.5, 'Candidate 3': 5.333333333, 'Candi date 4': 6.333333333) . It contains a function get_winner that takes one argument (a dictionary as returned by calculate_ results)and returns the name of the candidate with the highest average score. Assume there will be a single winner (e.g., no tiebreaker is necessary, no multiple winners). o If the argument to this function were the dictionary shown as an example under calculate results above, the resulting value would be candidate 4' because Candidate 4 has the highest average score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
