#C13569. Case-Insensitive Character Frequency Counter
Case-Insensitive Character Frequency Counter
Case-Insensitive Character Frequency Counter
You are given a string S (which may include letters, digits, and special characters). Your task is to count the frequency of each character in S while ignoring the case.
In other words, convert all alphabetical characters to lower-case and then count each character's occurrence. The output should be in the form of a dictionary that maintains the order of the first occurrence of each character. For example, if S is "Programming", then the output should be:
{'p': 1, 'r': 2, 'o': 1, 'g': 2, 'a': 1, 'm': 2, 'i': 1, 'n': 1}
Mathematically, if we denote the input string as \(S\), then for each character \(c\) in \(S\) (after converting to lower-case), the frequency \(f(c)\) is given by:
\[ f(c)=\text{number of times } c \text{ appears in } S \]
inputFormat
The input consists of a single line containing a string S. Note that S may be empty and can include letters, digits, and special characters.
outputFormat
Output the dictionary representation of the frequency of each character in the input string. The dictionary must be printed in the format:
{'char1': count1, 'char2': count2, ...}
Ensure that characters appear in the order of their first occurrence in the string.
## samplea
{'a': 1}