-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path20.py
More file actions
33 lines (31 loc) · 841 Bytes
/
20.py
File metadata and controls
33 lines (31 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def minion_game(string):
vowels=['A','E',"I",'O','U']
Stuart_Score=0
Kevin_Score=0
'''
// TLB Error
for i in range(0,len(string)):
for j in range(i,len(string)):
l=[]
for k in range(i,j+1):
l.append(string[k])
r=''.join(l)
if r[0] not in vowels:
Stuart_Score+=1
else:
Kevin_Score+=1
'''
for i in range(len(string)):
if string[i] not in vowels:
Stuart_Score+=len(string)-i
else:
Kevin_Score+=len(string)-i
if Stuart_Score>Kevin_Score:
print('Stuart',Stuart_Score)
elif Kevin_Score>Stuart_Score:
print('Kevin',Kevin_Score)
else:
print('Draw')
if __name__ == '__main__':
s = input()
minion_game(s)