Write a program named frequency.py that performs a character-frequency analysis on an input file.
Every distinct character in the file should be counted, and the final counts for each character should be divided by the total number of characters in the file.
The frequencies should be rounded to 3 decimal places.
The program should print a dictionary mapping each character to its associated frequency.
Example
For a file containing
a
bbb
ccc
The frequencies should be
{'a': 0.111, 'b': 0.333, 'c': 0.333, '
': 0.222}
Another file might have
a
bb
The frequencies should be
{'a': 0.25, 'b': 0.5, '
': 0.25}
note also how their is a difference in round to three and second place seen in the examples above. i need the program to run and be able to do both