Question: write winner function using python and using the score function 17 Dictionaries Function name: winner Parameters: a_dict (dict) Return Type: str Description: This function should

17 Dictionaries Function name: winner Parameters: a_dict (dict) Return Type: str Description: This function should return the name of the winning football team when a_dict has the following format... { "Teaml" : (1, 1, 0, 0, 0), "Team2" : (1, 1, 0, 1, 0)). You may assume that there are only two teams and that there will not be a tie, i.e. both scores will never be the same. Hint: It may be helpful to call the score function you wrote previously. Test Case: >>> a_dict - { "Texans" : (2, 0, 2, 2, 0), "Bills" : (1, 1, 0, 4, 0) >>> winner (a_dict) "Texans" def score(a_tuple): total score - Ca_tuple[0] . 6) + (a_tuple[1]) + (a_tuple[2] . 2) + (o_tuple[3] . 3) + (a_tuple[4] . 2) return total_score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
