Spaces:
Sleeping
Sleeping
File size: 296 Bytes
cd7967c | 1 2 3 4 5 6 7 8 9 10 11 | def count_vowels(text):
"""Count the number of vowels (a, e, i, o, u) in the given text.
Should be case-insensitive.
"""
# BUG: Only counts lowercase vowels, ignores uppercase
count = 0
for char in text:
if char in 'aeiou':
count += 1
return count
|