103. Python Program to Count the Vowels in a Sentence
MediumMethods
Overview
Combine a string method with a for loop and a counter.
Problem Statement
Read a sentence and count its vowels: a, e, i, o and u, in small letters or capitals. Print the count. For example, for Hello World:
Vowels: 3
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One line of text. Example:
Hello World
Output
The output for that example:
Vowels: 3
The tests try 4 different inputs, including one in capitals and one with no vowels at all.