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

A muffin recipe calls for 4 tablespoons of water to make 10 servings. How many tablespoons of water are needed to make 8 servings? Answers: A.
Twenty stamps cost $8.40. How much does it cost to buy 5 stamps? Answers:  A. $2.10
Fungi exist primarily in the form of long filaments called?
Twenty stamps cost $8.40. How much does it cost to buy 5 stamps? Answers:  A. $2.10
what year did mid slavery started
The number 0.127 is how much greater than 1/8 ? Can you explain this so I can understand how it works?
An oil refinery produces gasoline from crude oil. For every 10,000 barrels of crude oil supplied, the refinery can produce 6,500 barrels of gasoline. How many bar
salt & sugar do not appear to have a fix shape.why do we call them solid
Which is longer ; 180 seconds or 3 minutes?
why did archimedes of syracuse go to alexandria to study and not near home