Answers for "write a program to check whether a character is vowel or consonant in python"

0

write a program to check whether a character is vowel or consonant in python

# taking user input
ch = input("Enter a character: ")

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")
else:
    print(ch, "is a Consonant")
Posted by: Guest on September-28-2020
-1

is vowel python

vowels = {'a','e','i','o','u'}

my_string = "This is my awesome stupendous string!"

for c in my_string:
  if c in vowels:
    print(c)
Posted by: Guest on July-05-2021

Code answers related to "write a program to check whether a character is vowel or consonant in python"

Python Answers by Framework

Browse Popular Code Answers by Language