#Problem 2 - 25 points #In the United States, the winner of a presidential election is the #candidate with the greatest number of points. Each state in the nation #is allocated a specific number of points. Let's assume that the candidate #who wins the most popular votes in a state is given all of that state's #points. For example, Pennsylvania has 20 points. So, the candidiate #who wins the popular vote in Pennsylvania gets all 20 points. #In case and both candidates got the same number of votes in specific state, the points will be split evenly. #Assume you have a two-dimensional array of integers named votes that #contains a column for each state and 3 rows. The first row contains the #number of popular votes Candidate A won in each state. The second row #contains the number of popular votes Candidiate B won in each state. The #third row contains the number of points for each state. #Example (assuming there are only seven states): #Candidate A 382 47 167 844 219 57 93 #Candidate B 210 47 230 561 119 112 18 #Points 10 15 5 20 10 5 3 #For the state in the first column, Candidate A has 382 votes and #Candidate B has 210 votes. #So, Candidate A wins the state and gets 10 points. #For the state in the second column, both candidates got the same number of votes and points will be splitted. #So each candidate will get 7.5 points. #Candidate A wins the states in the first, fourth, fifth and seventh #columns. So, Candidate A gets 10 + 7.5 + 20 + 10 + 3 = 50.5 points. Candidiate B #wins the states in the third and sixth columns and gets 7.5 + 5 + 5 = 17.5 points. #Candidiate A wins! #Write a function def winner(votes, row, col) that has three parameters- two dimensional #array of votes, number of rows (in our case it will be 3) and the number of columns. The #function returns 1 if Candidate A wins, 2 if Candidate 2 wins and 0 if there is a tie. #Complete the main to print the winner. def main(): row = 3 col = int(input("enter number of states ")) votes =[[0 for i in range(col)]for j in range(row)] for i in range(row-1): for j in range(col): print("enter vote for candidate ", chr(65+i), "in state", j+1) votes[i][j]=int(input("")) for j in range(col): print("enter points for state", j+1) votes[2][j]=int(input("")) print("the votes are\n ") for i in range(row): print(votes[i]) #complete the main to find the winner #def winner(votes, row, col): #complete this function main()