Question: Write a main function that prompts for a file name and counts the frequency of each letter (a through z) using a dictionary. Make
Write a main function that prompts for a file name and counts the frequency of each letter (a through z) using a dictionary. Make each letter lowercased and ignore punctuation. Print a histogram of the word counts. Use string format method to format the table as shown below. You may use USConstitution.txt file, included with this assignment, to test your program. Here is a sample run: Enter file name USConstitution.txt letter count 2075 437 938 914 3711 a b QUO SECOPUS DE XAN d e g h i j k 1 m n q r t u V W 720 340 1428 1702 84 45 1112 578 1983 1956 495 32 1525 1991 2667 741 314 281 88 378 17
Step by Step Solution
There are 3 Steps involved in it
Below is a Python program that accomplishes the task described It prompts the user for a file name r... View full answer
Get step-by-step solutions from verified subject matter experts
