id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

bryce.hulett@hotmail.com > vowel_count
prev  |  next  |  chance

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].


vowel_count('i think, therefore i am') → [1, 3, 3, 1, 0]
vowel_count('martin douglas stepp') → [2, 1, 1, 1, 1]
vowel_count('four score and seven years ago') → [3, 4, 0, 3, 1]

...Save, Compile, Run (ctrl-enter)

def vowel_count(s):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 290 Post-solution available

Copyright Nick Parlante 2017 - privacy