09Count the Vowels

    Easystringsloops

    Write count_vowels(text) that returns how many vowels (a, e, i, o, u) appear in text.

    Upper-case vowels count too.

    Examples

    Example 1
    >>> count_vowels('hello world')
    3
    Example 2
    >>> count_vowels('AEIOU')
    5

    Run examples checks the 2 examples above. Submit runs all 6 tests, including hidden edge cases, and marks the challenge solved.

    solution.py
    Loading Python…

    Test results show up here

    Write count_vowels in the editor, then run the examples. Use print() freely: its output is shown for each test.