Vowel or Consonant check  in Python

Vowel or Consonant check in Python

How can we check vowel or consonant in Python? We use character variable to check this program and "print" function to print the result.

Vowel or Consonant in Python :


ch = input("Please Enter Your Own Character : ") if(ch == 'a' or ch == 'e' or ch == 'i' or ch == 'o' or ch == 'u' or ch == 'A' or ch == 'E' or ch == 'I' or ch == 'O' or ch == 'U'): print("The Given Character",ch, "is a Vowel") else: print("The Given Character",ch, "is a Consonant")

Output :