logo CodeStepByStep logo

is_all_vowels

Language/Type: Python boolean logic return string

Write a function named is_all_vowels that returns whether a string consists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of the string is a vowel, your function should return True. If any character of the string is a non-vowel, your function should return False. Your function should return True if passed the empty string, since it does not contain any non-vowel characters.

For example, here are some calls to your function and their expected results:

Call Value Returned
is_all_vowels("eIEiO") True
is_all_vowels("oink") False
Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.