Write a program to count Vowels and Consonants in string.
v = 0
c = 0
list1 = ['a','e', 'i', 'o', 'u']
list2 = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p','q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z']
string = input('Enter string here:').lower()
for i in string:
if i in list1:
v += 1
elif i in list2:
c += 1
print(c)
print(v)
Comments
Leave a comment