Check whether a character entered by the user is vowel or consonant

Banu Prakash M
Guvi
Published in
1 min readAug 14, 2019

Problem 3 :

In this problem you will learn how to check whether a character entered by the user is vowel or consonant. This problem is solved using if…else statement.

Steps :

The five alphabets A, E, I, O and U are called vowels. All other alphabets except these 5 vowel letters are called consonants.

Get the input from the user.

If the given character is equal to both uppercase & lowercase letter of (“A”,”E”,”I”,”O”,”U” & “a”,”e”,”i”,”o”,”u”) print (“Vowel”).

If the condition is false will automatically tell that given character is (“Consonant”).

Code Snippet for the above program which follows the proper test-case format :

guvi = raw_input()if(guvi=='A' or guvi=='a' or guvi=='E' or guvi =='e' or guvi=='I'or guvi=='i' or guvi=='O' or guvi=='o' or guvi=='U' or guvi=='u'):    print("Vowel")else:    print("Consonant")

--

--