Input
The letter to be checked
Description
N/A
Constraints
N/A
Sample
N/A
Output
The first line will contain a message prompt to input the letter to be checked.
The second line verifies whether the letter is a vowel or not.
Enter·the·letter:·a
Vowel
ch = input('Enter the letter: ')[0]
if ch.lower() in ['a', 'e', 'i', 'o', 'u']:
print('Vowel')
else:
print('Consonant')
Comments
Leave a comment