Answer:
Following are the program in the Python Programming Language.
def vowel(): #define function
print("Enter END to Break") #print message
while(True): #set while loop
word=input("Enter words: ") #get input from the user
count=0 #set count to 0
if(word=="END"): #set if condition
break #terminate the loop
else:
for i in range(len(word)): #set the for loop
c=word[i] #initialize in c
if(c=='a'or c=='e' or c=='i'or c=='o'or c=='u'or c=='A'or c=='E'or c=='I'or c=='O'or c=='U'):
count+=1 #increament in count by 1
print("The word " , word , " contains " , count, end=" ")#print message
if(count==1):#check condition
print("vowel.")
else:
print("vowels")
#call the function
vowel()
Output:
Enter END to Break
Enter words: Vowel
The word Vowel contains 2 vowels
Enter words: END
Explanation:
Here, we define a function "vowel()" inside it.
Finally, we call the following function "vowel()".