The Minion Game HackerRank solution
def minion_game(string):
# your code goes here
s_score = 0
k_score = 0
s =string
for i in range(len(s)):
if s[i] in('A','E','I','O','U'):
k_score += len(s)-i
else:
s_score += len(s)-i
if k_score > s_score:
print('Kevin', k_score)
elif k_score < s_score:
print('Stuart', s_score)
else:
print('Draw')
if __name__ == '__main__':
s = input()
minion_game(s)
Comments
Post a Comment