Python program to test whether a passed letter is a vowel or not
code:-
def is_vowel(char):
all_vowels = 'aeiou'
return char in all_vowels
print(is_vowel('e'))
print(is_vowel('z'))
print(is_vowel('h'))
print(is_vowel('u'))
output:-True
False
False
True
False
False
True
Post a Comment
If you have any doubts, Please let me know
Thanks!