DESCRIPTION:
Return the number (count) of vowels in the given string.
We will consider a, e, i, o, u as vowels for this Kata (but not y).
The input string will only consist of lower case letters and/or spaces.
def get_count(sentence):
print(sentence)
return (sentence.count('a'))+(sentence.count('e'))+(sentence.count('i'))+(sentence.count('o'))+(sentence.count('u'))
def getCount(s):
return sum(c in 'aeiou' for c in s)
'알고리즘 문제 > CodeWar' 카테고리의 다른 글
Thee Supermarket Queue (0) | 2022.09.22 |
---|---|
Write Number in Expanded Form (1) | 2022.09.21 |
Find the odd int (0) | 2022.09.21 |
Persistent Bugger (0) | 2022.09.21 |
String ends with? (0) | 2022.09.20 |