Created
August 20, 2021 14:52
-
-
Save r14152/ef3187a44f641fc7518da58b6fc39cdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def minion_game(string): | |
# your code goes here | |
kevin = 0 | |
stuart = 0 | |
for i in range(0,len(string)): | |
if string[i] in ['A','E','I','O','U']: | |
kevin += len(string)-i | |
else: | |
stuart += len(string)-i | |
if kevin == stuart: | |
print("Draw") | |
elif kevin > stuart: | |
print("Kevin",kevin) | |
else: | |
print("Stuart", stuart) | |
if __name__ == '__main__': | |
s = input() | |
minion_game(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment