Answer to Question #342764 in Python for dfgvsdc

Question #342764

In this exercise you will create a program that reads a letter of the alphabet from the user. If the user enters a, e, i, o or u then your program should display a message indicating that the entered letter is a vowel. If the user enters y then your program should display a message indicating that sometimes y is a vowel, and sometimes y is a consonant. Otherwise your program should display a message indicating that the letter is a consonant.


1
Expert's answer
2022-05-19T08:56:44-0400
vowels = ['a', 'e', 'i', 'o', 'u']


letter = str(input())


if letter in vowels:
    print("letter is a vowel")
elif letter == "y":
    print("sometimes y is a vowel, and sometimes y is a consonant")
else:
    print("letter is a consonant")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS