Python Program to input any string and differenciat vowels and consonants
sen=input('Enter a sentence.. ')
a=' '
b=' '
for i in sen:
if i in 'aeiou':
a=a+i
elif i==' ':
continue
else:
b=b+i
print('vowels=',a,'consonants=',b)
sen=input('Enter a sentence.. ')
a=' '
b=' '
for i in sen:
if i in 'aeiou':
a=a+i
elif i==' ':
continue
else:
b=b+i
print('vowels=',a,'consonants=',b)
Comments
Post a Comment