Given a character, write a program that checks if the character is a vowel or consonant. Print an appropriate message to the console.
Example:
Input: a
Output: 'a' is a vowel.
You can create a list of vowels and then check if the given character is in the list.
ch = input("Enter a character: ")
if ch.lower() in ['a', 'e', 'i', 'o', 'u']:
print(f"'{ch}' is a vowel.")
else:
print(f"'{ch}' is a consonant.")
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.