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

629999 rounded to the nearest hundred thousand is
which stimulant is also referred to as Crystal or crank and leaves the user feeling confused , shaky, and paranoid when it wears off
What postponed the suffrage movement in the beginning of the 20th century? A. House of Commons B. Equal Franchise Act C. Parliament D. WWI
two angles form a straight angle. what is the one angle measures 89°. what is the measure of the other angle?
In the speech "The Question of South Africa," what does Tutu claim is the root cause of the problems in his country? a. apartheid b. the United Nations lack of
The grap of y= x is shifted 5 units up and 4 units to the left. What is the equation of the translated function?
If 35=M45=60N35=M45=60N, what is M+NM+N?
Does learning always have a positive effect on a persons life
Ginny's house is 20 yards long. She says that the house is 720 feet long. Is Ginny correct
Which of the following is a perfect cube? 4 8 9 12