Program to Count number of Vowels in a given String | Python Programs

preview_player
Показать описание
#PythonProgram #CountnumberofVowelsinaGivenString #PythonTutorials

Write a program to count no. of vowels in a given string
str=input('enter any string')
count=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' :
count=count+1

print('No. of vowels=',count)
Рекомендации по теме