The class voted for a class rep and the votes are in a dict of name to count. Write winner(votes) to return the name with the most votes. On a tie, return the one that comes first in the dict. There is always at least one name.
winner({"Amy": 5, "Ben": 8, "Cat": 3})→'Ben'winner({"Leo": 4, "Mia": 4})→'Leo'def winner(votes):
best_name = ""
best_count = -1
for name, count in votes.items():
# your code here: more than best_count? remember this one
pass
return best_name
Run tries the examples. When they look right, Submit.