Write a program to input a character and check whether it is an alphabet, space, digit or special character. If it is an alphabet, check whether it is a vowel or consonant.
Answers
Answered by
0
Answer:
n = input("Character : ")
if n.isalpha():
if n in "aeiou":
print("It's a vowel")
else:
print("It's a consonant")
elif n.isspace():
print("It's a space")
elif n.isnumeric():
print("It's a number")
else:
print("It's a special character")
Similar questions