Question: Write a program to build a text histogram of the distribution of letter frequencies in an input string. Get input from the user using

Write a program to build a text histogram of the distribution of

Write a program to build a text histogram of the distribution of letter frequencies in an input string. Get input from the user using the provided code, which uses lower () to convert the string to lower case. Then construct a dictionary where each key, value pair relates a character found in the input string to the number of times that character occurs. Express the frequency as one "X" per occurrence. For example, if the letter "a" appears in your input string 4 times, the key value pair is "a": "XXXX". After constructing the dictionary, print out all lower case letters and their corresponding frequency. Additional implementation details are provided in comments included in the Python template file, below. For example, if your input is: war eagle! The output should be: a: XX e: XX g: X 1: X r: X w: X Activate Windows Go to Settings to activate

Step by Step Solution

3.45 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Python program that builds a text histogram of the distribution of letter fre... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!