Strings and text · Python exercise
Count the vowels in a line of text, ignoring case.
Read one line of text and print the number of vowels (a, e, i, o, u) it contains. Treat uppercase and lowercase letters the same.
Example 1
Input
Hello World
Output
3
Example 2
Input
AEIOU
Output
5
How testing works
Your code runs once per test case with that case's standard input. Output is compared after normalising trailing spaces and blank lines at the end. Use input() without a prompt when the exercise expects clean output.
Loading editor…
Press Run tests to execute your code against every input case. Python runs in a Web Worker in your browser.