Python program to count the Number of Vowels in a string | count numbers of vowels in a string |

Python program to count the Number of Vowels in a string | count numbers of vowels in a string |

Count the Number of Vowels in a string using python program



count the Number of Vowels in a string | count numbers of vowels in a string |
Count the Number of Vowels in a string in a python 

Program -


str=input("Enter string :")
v=0 
for i in str:
    if(i=='a'or i=='e'or i=='i'or i=='o'or i=='u'or i=='A'or i=='E'or            i=='I'or i=='O'or i=='U'):
        v=v+1            # Count vowels 
print("Number of vowels are:",v)




Output-

Enter string :Welcome

Number of vowels are : 3












Post a Comment

Post a Comment (0)

Previous Post Next Post