DML School of Technology
Menu

Getting going, Strings

Count the vowels

The task

Count the vowels (a, e, i, o, u) in a piece of text. Capital letters count too.

Write a function called count_vowels.

Tests

CallExpectedYours
count_vowels('education') 5 not run
count_vowels('Rhythm') 0 not run
count_vowels('AEIOU aeiou') 10 not run
count_vowels('') 0 not run

Next challenge · All challenges

solution.py

Tab indents. To leave the editor, press Escape, then Tab.

Output

Run prints what your code prints. Run the tests to check your function.