Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help with this program in PYTHON: for the file, make up a plain.txt file with any words in it Write a function that reads

need help with this program in PYTHON:

for the file, make up a plain.txt file with any words in it Write a function that reads the contents of a text file. The function should create a dictionary in which the keys are the individual words from the file, and the values are the number of times each word appears in the file. The main program should ask the user for the name of the file to read, pass that name to the function, and get the dictionary returned from the function. Main should display the word / frequency pairs in alphabetical order one per line. Also display the most frequently used word and the number of times it was used.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

In what ways could others help?

Answered: 1 week ago