top of page

Program to Count the Number of Vowels in String in Python

Program to Count the Number of vowels we’re going to check how many vowels are present in a given String . There are five vowels– a, e, i, o, u.


Step 1:- Start.

Step 2:- Take user input.

Step 3:- Initialize count variable.

Step 4:- Iterate through the string to find number of vowels.

Step 5:- Check if the alphabet of the string lies under the group of vowels.

Step 6:- If TRUE increment count by 1.

Step 7:- Print count.

Step 8:- End.

Flow Chart

String = input('Enter the string :')
count = 0

String = String.lower()
for i in String:
    if i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u':
        #if True

if count == 0:
    print('No vowels found')
    print('Total vowels are :' + str(count))


The Tech Platform

bottom of page