Python program to check Vowel or Consonant

ch = input('Enter any character: ')
# check vowel or constant and display result
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")
    print(ch, "is a Consonant")


Enter any character: e
e is a Vowel
Enter any character: l
l is a Consonant

Sharing Is Caring

Leave a Comment