Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
pmbhatiya authored Mar 18, 2020
1 parent 9d34bf6 commit 5d6dc3b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions the-minion-game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#The-minion-game HackerRank python Solution
def minion_game(string):
vowels = 'AEIOU'
str_lenght = len(string)
kevin_score, stuart_score = 0, 0

for i in range(str_lenght):
if s[i] in vowels:
kevin_score += (str_lenght - i)
else:
stuart_score += (str_lenght - i)

if kevin_score > stuart_score:
print("Kevin", kevin_score)
elif kevin_score < stuart_score:
print("Stuart", stuart_score)
else:
print("Draw")



if __name__ == '__main__':
s = input()
minion_game(s)

0 comments on commit 5d6dc3b

Please sign in to comment.