Python Program to Check Vowels

« Previous Program Next Program »

Check Vowels in Python

To check whether the input character is a vowel or not in python, you have to ask from user to enter a character to check whether that character is a vowel or not as shown in the program given below.

Python Programming Code to Check Vowels

Following python program ask from user to enter any character to find whether it is a vowel or not:

# Python Program - Check Vowel or Not
while True:
	print("Enter '0' for exit.")
	ch = input("Enter any character: ")
	if ch == '0':
		if(ch=='a' or ch=='A' or ch=='e' or ch=='E' or ch=='i' or ch=='I'
		   or ch=='o' or ch=='O' or ch=='u' or ch=='U'):
			print(ch, "is a vowel.\n")
			print(ch, "is not a vowel.\n")

Here is the sample run of the above Python program demonstrating how to check for vowel:

python check vowel

Same Program in Other Languages

You may also like to learn or practice the same program in other popular programming languages:

« Previous Program Next Program »


Quick Links
Signup - Login - Give Online Test