logo CodeStepByStep logo

vowel_count

Language/Type: Python lists string tallying

Write a function named vowel_count that accepts a String as a parameter and returns a list of integers representing the counts of each vowel in the String. The list returned by your function should hold 5 elements: the first is the count of As, the second is the count of Es, the third Is, the fourth Os, and the fifth Us. Assume that the string contains no uppercase letters.

For example, the call vowel_count("i think, therefore i am") should return the list [1, 3, 3, 1, 0].

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.