Vowel Counter
Counting specific characters is a common building block in search, text checks, and simple string analysis. Write count_vowels, which counts the English vowels a, e, i, o, and u in the string s. Letter case does not matter, so uppercase and lowercase vowels should be counted the same way.
Примеры
Ввод
"hello world"Вывод
3Ввод
"HELLO WORLD"Вывод
3Ввод
"123 hello world"Вывод
3Нужно реализовать
def count_vowels(s: str) -> int:
Теги
strings
Logáil isteach chun stair na n-aighneachtaí a fheiceáil
Logáil isteachLogáil isteach chun an Meantóir IS a úsáid
Logáil isteachVisible tests
1
Input
"hello world"Expected
32
Input
"HELLO WORLD"Expected
33
Input
"123 hello world"Expected
34
Input
""Expected
05
Input
"a quick brown fox"Expected
56
Input
"the quick BROWN fox"Expected
5Focus radio
Paused · SomaFM · Fluid