In this python if else program, we will check whether an input alphabet is a vowel or not.
Vowel: A speech sound produced without obstruction or audible friction in the mouth. : a letter (as a, e, i, o, u, and sometimes y) representing a vowel.
Steps to solve the program
- Take an alphabet as input through the user.
- Create a list of vowels.
- Using an if-else statement check whether the input vowel is in the list or not.
- Print the output.
char = input("Enter a character: ")
vowel = ["A","E","I","O","U","a","e","i","o","u"]
if char in vowel:
print("True")
else:
print("False")
Output :
Enter a character: A
True
Related Articles
Python program to check whether an alphabet is a consonant.
Python program to convert the month name to the number of days.
Python program to check whether a triangle is equilateral or not.
Python program to check whether a triangle is scalene or not.
Python program to check whether a triangle is isosceles or not.
Python program that reads month and returns season for that month.