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

various elements of greek drama?
a ball is dropped and falls with an acceleration of 9.8m/s^2 downward. it hits the ground with a velocity of 49m/s downward. how long did it take the ball to fa
A doctor develops the model y = 36.57x+4 for the number of words a toddler can speak (x) versus the months that have passed since they started speaking (y). Int
Process of taking metal and making goods and useful items, such as horseshoes and tools.
Which type of links are reside on pages that do not belong to your domain? a. external b. internal c. internal/external d. none of these
What modern president is responsible for the No Child Left Behind act? A. George W. Bush B. William Clinton C. Ronald Reagan D. Jimmy Carter
what's used to locate a point on the coordinate plane
the conclusion to “the way to wealth” is signed by _____.
how are environmental issues related to scarcity and opportunity cost
what is the pattern between 12,24,72,288