Counting vowels
- by user74283
Can anyone please tell me what is wrong with this script. I am a python newb but i cant seem to figure out what might be causing it not to function.
def find_vowels(sentence):
"""
>>> find_vowels(test)
e
"""
count = 0
vowels = "aeiuoAEIOU"
for letter in sentence:
if letter in vowels:
count += 1
print count
if __name__ == '__main__':
import doctest
doctest.testmod()