11. Write a python program to generate a function to check whether the input alphabet is vowel or not.
The output is:
Input: letter "a" and "z"
Expected Answer:
Is letter 'a' a vowel: True
Is letter 'z' a vowel: False
Sample Answer:
def check_vowel(letter): vowels = 'aeiou' return letter in vowels print("Is letter 'a' a vowel:", check_vowel('a')) print("Is letter 'z' a vowel:", check_vowel('z'))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)