Question: In Python 3!! Write a program that reads in the contents of a text file and displays a histogram of the frequency that words appear

In Python 3!!

Write a program that reads in the contents of a text file and displays a histogram of the frequency that words appear in the text.

Requirements:

- Prompt the user to enter the filename of a text file

- Read the contents of that text file and count the number of times each word appears in the file

- Store the words and associated counts in a dictionary as key-value pairs

- Display a histogram using asterisks representing the frequency that the words in the file appear

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 Databases Questions!