Question: The program should have the following functions:a . A function to read data from a file and returns a list of words in a file.b

The program should have the following functions:a. A function to read data from a file and returns a list of words in a file.b. A function that creates a list of unique words from a file and returns it.c. A function that creates a list of union of words in two files and returns it.d. A function that creates a list of common words in two files and returns it.e. A function that creates a list of words in one file but not in another file and returns it.f. A function that prints in tabular format the count of each word in a file.g. Main function to call all the above functions.h. A function to write data from a list to a file. Make sure you remove punctuations at the end of each word. Do not Use set operations to perform the above analyses. Grading Criteria:2 points for each function (a f)4 points for each function (g h)2 points will be deducted if punctuations are not removed.10 points will be deducted if you use set operations. Here is sample run for input files, file1.txt and file2.txt: file1.txtone, two, three, four, five;six seven:eight!nine ten eleven:twelve?one two three.File2.txtone, two, three four five, sixanotherseven!anothereight?nine ten eleventwelve:ten eleven twelve; Output in shell:Enter the name of the first input file: file1.txtEnter the name of the second input file: file2.txtdata saved in fileAnalysis.txt Output in file:

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!