Skip to content

Commit c7839e9

Browse files
Merge pull request #1866 from CodingTestStudy2/최원준
[최원준] Day21
2 parents db58cc2 + 875fe26 commit c7839e9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Solution:
2+
def vowelConsonantScore(self, s: str) -> int:
3+
vc = [0,0]
4+
for c in s:
5+
if c in ('a','e','i','o','u'):
6+
vc[0]+=1
7+
elif c.isalpha():
8+
vc[1]+=1
9+
return floor(vc[0]/vc[1]) if vc[1]>0 else 0

0 commit comments

Comments
 (0)