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

The diameter of a sphere is 4 centimeters. Which represents the volume of the sphere?
trigonometry, someone help me with this​
Name the American businessman who adjusted his production and built many ships in WW2.
i’m confused on this but wouldn’t it be D?
I need 3 adjectives for the word "right now" thanks
if a=3 and b=4 then ba=
A bird that preys on moths is introduced to the habitat with moths and trees like the ones shown below. What will most likely happen to the population of moths
why do you relate to the quote “Love is lak de sea. It’s uh movin’ thing, but still and all, it takes its shape from de shore it meets, and it’s different with
Check each question that is true about meteorids
Why are high-tax-bracket investors more inclined to invest in municipal bonds than are low-bracket investors?