vowel = ['a','e','i','o','u']
string = input("Enter the string: ")
vowel_count = 0
con_count = 0
for i in range(len(string)):
if string[i] in vowel:
vowel_count += 1
else:
con_count = con_count + 1
print("Number of vowels: ", vowel_count)
print("Number of consonants: ", con_count)
Comments
Leave a comment