Question: I need help with this coding!!! This is Python 1. Write a function scan_for(file_name, word) that takes 2 string parameters: 1. file_name - a string

 I need help with this coding!!! This is Python 1. Write

I need help with this coding!!! This is Python

1. Write a function scan_for(file_name, word) that takes 2 string parameters: 1. file_name - a string representing a file name 2. word - a word to scan for in the file 2. The function reads the file and prints the number of occurrences of the specified word that exist in the file, in the format displayed below in the example output. 3. In this program removing punctuation and ignoring case is not required. 4. The following is sample output using a file available with the homework template: >>> scan_for('shoes.txt', 'I') The word I appears 3 times in shoes.txt >>> scan_for('shoes.txt', 'shoes') The word shoes appears 2 times in shoes.txt >>> scan_for('shoes.txt', 'tree') The word tree appears 0 times in shoes.txt

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!