You are viewing a single comment's thread. Return to all comments →
Here's my code:
def minion_game(s): vowels, n, scores = 'AEIOU', len(s), {'Kevin': 0, 'Stuart': 0} for i, char in enumerate(s): scores['Kevin' if char in vowels else 'Stuart'] += n - i winner = max(scores, key=scores.get) print(f'{winner} {scores[winner]}' if len(set(scores.values())) > 1 else 'Draw')
Seems like cookies are disabled on this browser, please enable them to open this website
The Minion Game
You are viewing a single comment's thread. Return to all comments →
Here's my code: