In this blog, we wrote a program for creating a vowels count deductor program using python programming.

Algorithm:

Step-1: START

Step-2: First get input from the user, in this blog directly initialize in a program,
declare words variable store the string.
Step-3: Then create a list storing vowels characters in both upper and lower case.

Step-4: Next initialize the Vowels_Count variable to store the default value is 0.

Step-5: Declare for loop iterate and separate each character store in character
variable(loop terminate until the end of the string character, (for character in words:).
Step-6: Then check whether characters is vowels or not using if condition(if character in vowels:),
perform in for loop, if the condition is true then program work based on given statement below if condition.
(Vowels_Count+=1), Vowels_Count variable is increment by until vowels are percent in string and end of the loop.

Step-7: STOP

Program in python:

words='Innovative_Codes_Academy'
vowels=['a','e','i','o','u','A','E','I','O','U']
Vowels_Count=0
for character in words:
    if character in vowels:
        Vowels_Count+=1
print("In this word Innovative_Codes_Academy",Vowels_Count,"vowels are persent.")

OUTPUT:

===== RESTART: C:\Users\Prabakaran\Desktop\Python Programs\Python\Practice2X.py =====
In this word Innovative_Codes_Academy 10 vowels are persent.

Any queries leave a comment please and thanks for reading this post.

Leave a Reply

Your email address will not be published. Required fields are marked *