Skip to content

Commit 7189bd1

Browse files
authored
Create app.py
1 parent 5e6f2e2 commit 7189bd1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Minion Game/app.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# The Minion Game in Python
2+
def minion_game(string):
3+
player1 = 0;
4+
player2 = 0;
5+
str_len = len(string)
6+
for i in range(str_len):
7+
if s[i] in "AEIOU":
8+
player1 += (str_len)-i
9+
else :
10+
player2 += (str_len)-i
11+
12+
if player1 > player2:
13+
print("Kevin", player1)
14+
elif player1 < player2:
15+
print("Stuart",player2)
16+
elif player1 == player2:
17+
print("Draw")
18+
else :
19+
print("Draw")
20+
21+
if __name__ == '__main__':
22+
s = input()
23+
minion_game(s)

0 commit comments

Comments
 (0)