We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- The Minion Game
- Discussions
The Minion Game
The Minion Game
Sort by
recency
|
1295 Discussions
|
Please Login in order to post a comment
def minion_game(string): vowels='AEIOU' kevin_score=0 stuart_score=0 length=len(string)
def minion_game(string):
def minion_game(string_name): vowel_list ='AEIOU' stuart_score = 0 kevin_score =0 for i in range(len(string_name)): if string_name[i] in vowel_list: kevin_score += len(string_name)-i else: stuart_score +=len(string_name)-i if (kevin_score>stuart_score): return 'Kevin '+str(kevin_score) elif (stuart_score>kevin_score): return 'Stuart '+ str(stuart_score) else: return 'Draw'
It's hard to find the occurance of each word in string