This function counts the number of vowels in a sentence.
def VowelCount(Sentence):
vowelList = "aeiouAEIOU"
total=0
for i in Sentence:
if i in vowelList:
total += 1
return total
Sentence = "Jim wants to get a job in data science."
print('''The number of vowels in "''' + Sentence + '''" is ''' + str(VowelCount(Sentence)))
It gives an output like this:
The number of vowels in "Jim wants to get a job in data science." is 12