I have used python 3.7 compiler for debugging purpose.
str = input("Input a letter of the alphabet: ")
if str in ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'A', 'E'):
print("%s is a vowel." % str)
elif str == 'y':
print("Sometimes letter y stand for vowel, sometimes stand for consonant.")
else:
print("%s is a consonant." % str)
I have used python 3.7 compiler for debugging purpose.
Result:
Input a letter of the alphabet: A
A is a vowel.
need an explanation for this answer? contact us directly to get an explanation for this answer