In this post, we will write a Python program to check whether the entered character is vowel or consonant.
In this program, user is asked to input a character. The program checks whether the entered character is equal to the lowercase or uppercase vowels, if it is then the program prints a message saying that the character is a Vowel else it prints that the character is a Consonant.
# taking user input ch = input("Enter a character: ") if(ch=='A' or ch=='a' or ch=='E' or ch =='e' or ch=='I' or ch=='i' or ch=='O' or ch=='o' or ch=='U' or ch=='u'): print(ch, "is a Vowel") else: print(ch, "is a Consonant")
- C Program to check Vowel or Consonant
- Java Program to check Vowel or Consonant
- Python program to check whether the character is Alphabet or not
- Python program to check if number is even or odd
- Python program to print Hello World