Last active
May 10, 2017 09:58
-
-
Save DennisdeBest/8632372cfada7e708bf4a1507b04a5f5 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): | |
wordlistKevin = [] | |
vowels = ['A', 'E', 'I', 'O', 'U'] | |
scoreKevin = 0 | |
scoreStuart = 0 | |
for i in range (0, len(string)): | |
for j in range(i+1, len(string)+1): | |
if string[i] in vowels: | |
scoreKevin += 1 | |
else: | |
scoreStuart += 1 | |
if(scoreKevin < scoreStuart): | |
print ("Stuart {}".format(scoreStuart)) | |
elif (scoreKevin > scoreStuart): | |
print ("Kevin {}".format(scoreKevin)) | |
else: | |
print("Draw") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment