Question
In A Python program there are three files for this program : gettysburg.txt text,txt words.txt need to write a program that allows a user to
In A Python program
there are three files for this program :
gettysburg.txt
text,txt
words.txt
need to write a program that allows a user to compare any two text files. First you will display a menu asking the user which comparison they wish to make like the example below. Next you will ask the user for the name of the files to compare. Use an elif loop for each choice and call a method that you create to perform the required operations. The program should loop until the user enters 6.
Your program should display a menu like the following example:
Enter 1 to display the unique words: Enter 2 to display the words that appear in both files: Enter 3 to display the words that only appear in the first file: Enter 4 to display the words that only appear in the second file: Enter 5 to display unique words in either the first or second files but not in both: Enter 6 to exit the program:
Be sure to allow the user to test different files each time they make a choice. I have included a few text files for you to test your program on. Be sure to test the program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started