Gogontle4075 Gogontle4075
  • 15-12-2022
  • Computers and Technology
contestada

this function checks if a character is a vowel. if it is, it returns true. otherwise, it returns false. where should return false; be written in the code?

Respuesta :

belali
belali belali
  • 15-12-2022

In Python, it can be easily written as follows:

def check_vowel(char):

   return True if (char=='a' or char=='e' or char=='i' or char=='o' or char=='u') else False

   

print(check_vowel(input("Please enter the character: ")[0].lower()))

Ver imagen belali
Answer Link

Otras preguntas

Why would those who started the French Revolution and created the famous the decleration of Rights of Man and of the citizen say that the revolution was not suc
Identify the central argument of this passage
Which excerpt from the text most effectively develops this allegory? “In other studies you go as far as others have gone before you, and there is nothing more
The role and importance of investment recovery in an organization is driven in large part by the
The market will overproduce goods that have external costs because
I NEED A HELP !!!!! how can i find the domain of the graph that i attached??!?!?
Using the phase diagram for water, what phase is water at 0.01 degrees Celsius and 0.0060 atmospheres?
Goals of Government Spending Determine whether these examples show government spending that is focused more on improving the economy or on meeting social needs.
What can you do to improve your media literacy?
i really need help guys im begging