#C14756. Count Vowels in a String
Count Vowels in a String
Count Vowels in a String
You are given a string and your task is to count the number of occurrences of each vowel (i.e., a, e, i, o, u). The counting should be case-insensitive. You must output the result in the following dictionary format:
\(\{'a': x, 'e': y, 'i': z, 'o': w, 'u': v\}\)
For example, for the input string "hello world", the output should be:
\(\{'a': 0, 'e': 1, 'i': 0, 'o': 2, 'u': 0\}\)
Read the input from standard input (stdin) and output the result to standard output (stdout).
inputFormat
A single line of input containing a string \(S\). The string can include spaces and may be empty.
Input Format:
A single string.
outputFormat
Output a single line representing a dictionary that shows the count of vowels. The dictionary must use the following format (note the single quotes and order):
\(\{'a': x, 'e': y, 'i': z, 'o': w, 'u': v\}\)
Where \(x, y, z, w, v\) are the counts for vowels a, e, i, o, and u respectively.
## samplehello world
{'a': 0, 'e': 1, 'i': 0, 'o': 2, 'u': 0}