Python Program to Check whether a character is a Vowel or Consonant In this we are going to learn given character is vowel or Consonant. Generally there are 5 vowels they are a,e,i,o,u and remaining are the consonants in alphabets of 26. we can write this program by using strings. string is a collection of characters. Input: k Out put: Consonant Explanation : vowels={a,e,i,o,u,A,E,I,O,U} if input character in the above list then vowels, else consonant Code: r=input() # input string s="aeiou" ...
Comments
Post a Comment