Write A Python Program To Check A Character Is Vowel Or Not
Hi Programmers, welcome to my blog, lets try to get python solution for write a python program to check a character is vowel or not.
Title :
Python Problem : Write A Python Program To Check A Character Is Vowel Or NotDescription :
First lets take a string literal variable AEIOUaeiou then another temp variable and ask a user to enter a letter. Once the user enters the check if letter is present in string literal if yes print its a vowel, else print its not a vowel, nan
Code :
vowels = "AEIOUaeiou" temp = input("Enter a Character : ") if temp in vowels: print("Character is vowel") else: print("Character is not a vowel")
Conclusion :
Once you are done with reading the above code, open your python editor, try to write the program by yourself. This will improve your coding skills, try changing variable names, change operators and execute it.
Thank you for reading my article about write a python program to check a character is vowel or not if you have any queries about above solution, please comment down below, if you like this article share it with your friends.
0 Comments