no.of vowels and consonants in a string
Python
x = 'python'
count = 0
count1 = 0
for i in x:
if i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u':
count += 1
else:
count1 += 1
print(count)
print(count1)
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.