diff --git a/Python/Strings/The Minion Game/Solution.py b/Python/Strings/The Minion Game/Solution.py index dd46f3e..9f03e94 100644 --- a/Python/Strings/The Minion Game/Solution.py +++ b/Python/Strings/The Minion Game/Solution.py @@ -1,13 +1,13 @@ def minion_game(string): vowels = 'AEIOU' - str_lenght = len(string) + str_length = len(string) # Corrected the spelling of length kevin_score, stuart_score = 0, 0 - for i in range(str_lenght): - if s[i] in vowels: - kevin_score += (str_lenght - i) + for i in range(str_length): + if string[i] in vowels: # s could not be accessed, used the variable in the parenthesis + kevin_score += (str_length - i) else: - stuart_score += (str_lenght - i) + stuart_score += (str_length - i) if kevin_score > stuart_score: print("Kevin", kevin_score) @@ -19,4 +19,4 @@ def minion_game(string): if __name__ == '__main__': s = input() - minion_game(s) \ No newline at end of file + minion_game(s)