Answer to Question #209679 in Electrical Engineering for mona

Question #209679

write python program

To find the number of vowels in a sentence.


1
Expert's answer
2021-06-25T00:15:02-0400
# Python Program to Count Vowels in a String

str1 = input("Kindly Enter Your Own String : ")

vowels = 0
str1.lower()

for i in str1:
    if(i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u'):
        vowels = vowels + 1
 
print("Total Number of Vowels in this String = ", vowels)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS