Q. Write a function that takes a character and returns true if it is a vowel, false otherwise .
Answer =
def vowel(x):
if x in ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"]:
return "True"
else:
return "False "
a = input ("Enter the letter :- ")
print (vowel(a))
Output :-
Enter the letter :- a
True
>>>
Enter the letter :- A
True
>>>
Enter the letter :- B
False
>>>
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )