SQLDAXExcelPython
Leaderboard
Core PythonEasy10 points

Count the vowels

Complete count_vowels(text) so it returns how many letters are vowels, in either case.

How your answer is tested

After your code, this runs and its result is checked:

result = [count_vowels(t) for t in ["Power BI", "rhythm", "AEIOU", ""]]
Show solutionLifetime

Real Python running in your browser through Pyodide, with pandas available. Nothing you type is sent to a server unless you save a score.

Python
Loading editor…

Press Ctrl+Enter or Run to see the result here.