Two players play the Seven game. Each one throws a pair of dice on the table and scores the sum of the obtained values. A player wins when his score does not exceed seven and it is either closer to seven than the rival’s score or the rival’s score exceeds seven. Note that there are cases where no player wins. Write a function @winner(p, q, r, s)@ that given the dice values and got by the first player and and got by the second player returns integer if the winner is the first player, returns when the winner is the second player and returns integer when there is no winner. Dice values and are integers greater than zero and less that seven
>>> winner(1, 3, 5, 3) 1 >>> winner(2, 4, 4, 3) 2 >>> winner(1, 3, 2, 3) 2 >>> winner(2, 4, 3, 3) 0 >>> winner(4, 4, 5, 6) 0