Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions