Question: Write a program that reads an input.txt file and generates a word frequency chart. HINT: Use a dictionary where the words read from the file

 Write a program that reads an input.txt file and generates a

Write a program that reads an input.txt file and generates a word frequency chart. HINT: Use a dictionary where the words read from the file are keys, and each key has an associated count. Be sure to use strip and lower to ensure your check is case insensitive, and also not sensitive to trailing or leading whitespace characters. For instance, if given the file found in input-1.txt & , the output would look as follows: this : * * the : * * *# today : * * tomorrow: holiday : class : classroom: * sunday : * good : * bad : hello: * * world : * * program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!