Write a program that prompt the user for a word and count and print out the vowel letter in the word entered by the user
Answers
Answer:
Algorithm
Define a string.
Convert the string to lower case so that comparisons can be reduced. ...
If any character in string matches with vowels (a, e, i, o, u ) then increment the vcount by 1.
If any character lies between 'a' and 'z' except vowels, then increment the count for ccount by 1.
Print both the counts.
Source code: [in Python]
Explanation:
Once the word has been retrieved using the statement, a variable has been initialized to store the count of the vowels. A loop, which is an iteration statement used for repeated checking, is passed. The statement traverses through the string and checks for vowels using a conditional statement. If it satisfies the condition of being a vowel, the count is incremented by 1 and the vowel is displayed. The final count is then displayed.