Count Vowels
Write a function count_vowels that takes a string s and returns the number of vowels a, e, i, o, u in it. Letter case does not matter. A for loop over the characters of the string and a counter will help.
Примеры
Ввод
"hello"Вывод
2Ввод
"python"Вывод
1Ввод
"xyz"Вывод
0Нужно реализовать
def count_vowels(s: str) -> int:
Теги
strings
Prijavi se da vidiš povijest predaja
PrijavaPrijavi se da koristiš AI mentora
PrijavaTests8
Visible tests
Skriveni test 7
Skriveni test 8
They run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.
Focus radio
Paused · SomaFM · Fluid