Input Format
A single line of input containing the string .
Note: The string  will contain only uppercase letters: .
Constraints

Output Format
Print one line: the name of the winner and their score separated by a space.
If the game is a draw, print Draw.

hackerrank the minion game problem solution in python programming

Problem solution in python 2 programming language.

S = raw_input().strip()
S_length = len(S)
player1, player2 = 0,0

for i in xrange(S_length):
    if S[i] in "AEIOU":
        player1 += S_length - i
    else:
        player2 += S_length - i        
        
if player1 > player2:
    print "Kevin", player1
elif player1 < player2:
    print "Stuart", player2
else:
    print "Draw"

Problem solution in python 3 programming language.

S = input().strip()
S_length = len(S)
player1, player2 = 0,0

for i in xrange(S_length):
    if S[i] in "AEIOU":
        player1 += S_length - i
    else:
        player2 += S_length - i        
        
if player1 > player2:
    print("Kevin", player1)
elif player1 < player2:
    print("Stuart", player2)
else:
    print("Draw")