CJCoding With Joseph
15free / daySign inCreate account

Count Vowels By Letter

Read one word from the input (one line, no prompt) and count only its vowels. The dict vowels already holds the five vowels as keys with a count of 0 each; loop over the characters of the word and, using in to check whether the character is one of the keys, add one to its count when it is. Print the dict after the loop. Input: one line. Output: one line, the printed dict with all five counts.

Expected Output:

{'a': 3, 'e': 0, 'i': 0, 'o': 0, 'u': 0}

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
Dictionaries
📥 Auto-Input:
banana\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.