Question: solution required in python 6. [20 points] Write a function to read in a string which is the name of a file. The file contains

 solution required in python 6. [20 points] Write a function to

solution required in python

6. [20 points] Write a function to read in a string which is the name of a file. The file contains a list of words and returns a dictionary in which the keys are the words (uppercase and lower case words are treated as the same) and the values are the number of times the word has occurred. For example, given that words.txt has the following content: Hello hello again hello there The function when called with argument, words.txt" should return this: { "hello": 2, "again": 1, "there": 1 } In case the file does not exist, the function should display the following message: "File could not be found. [10 points]

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!