Count the vowels
Read a line of text and print how many vowels it has. The vowels are a, e, i, o and u, in lower or upper case.
Input
One line of text: 1 to 1000 letters, digits, spaces and punctuation.
Output
The number of vowels.
The input is read for you. The starter code puts it in variables; write your code under Your code here and print the answer. Changed the code already? Reset () brings the starter back.
Example 1
Input
Hello World
Output
3
Why:
e, o and o.
Example 2
Input
AEIOU aeiou
Output
10
Why:
Upper-case vowels count too.
Hints
Was this a good challenge?
- Solved by
- 0
- Submissions
- 0
- Accepted
- –