

InterviewSolution
Saved Bookmarks
1. |
Wap in python to sort vowels and consonants |
Answer» Text= input("Enter a string") count=0#for vowlesfor x in Text: if x in "aeiou": count+=1print("No.of volwels in the string are:",count) #for consonantscount=0for x in Text: if x in"bcdfghjklmnpqrstvwxyz": count +=1print ("No. of consonants are:", count)#for spacescount=0for x in Text: if (x==" "): count +=1print ("No. of spaces are:", count)#in same way find dots, commas, etc. | |