We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defminion_game(string):l=len(string)s,k=0,0foriinrange(l):ifstring[i]in"AEIOU":k+=l-ielse:s+=l-i#print(*("Stuart",s) if s>k else ("Kevin",k) if k>s else ("Draw",))print(f"Stuart {s}" if s>k else f"Kevin{k}" if k>s else "Draw")if__name__=='__main__':s=input()minion_game(s)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Minion Game
You are viewing a single comment's thread. Return to all comments →