Program 101: Vowel or Consonant using Python This program determines whether the input character is a vowel or a consonant. It also detects if the input is non-alphabet and check for a single character. Running Program: https://onlinegdb.com/jNy97z07b Code: # Vowel or Consonant using Python char = input ("Enter an alphabet letter: ") size = len(char) if size>1: print("Invalid, input one character only") else: if not char.isalpha (): print (char, "is a non alphabet") elif char in ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'): print (char, "is a vowel") else: print (char, "is a consonant")
4 comments
Is this PHP? C++ java or coding?
Python Programming language
You're an IT?
That is so good and easy to learn tutorial... Like it