Homework IX-a Write a program that opens a text file, whose name you enter at the keyboard You will be using the file text.txt to test your program. Print out all of the individual, unique words contained in the file, in alphabetical order Print out the number of unique words appearing in text.txt. Call your program: YourName-HwrklXa.py Make sure that your name appears as a comment at the beginning of the program as well as on the output display showing the unique words Homework IX-b Write a program that reads the contents of two text files and compares them in the following ways It should display a list of all the unique words contained in the union of both files. It should display a list of the words that only appear in both files. It should display a list of the words that appear in the first file but not the second It should display a list of the words that appear in the second file but not the first. It should display a list of the words that appear in either the first or second file but not both . Take particular care to be sure that words that are spelled the same, except for case are not considered two different words (e.g. "The" and "the" are the same word) . Take particular care to be sure that all punctuation is stripped away so that words like, "quick" and "quick," are not considered two different words. The two files you will compare are: first_file.txt and second_file.txt Call your program: YourName-HwrkiXb.py Again, make sure that you name appears as a comment at the beginning of the program as wel as on the output display showing the results. Homework IX-a Write a program that opens a text file, whose name you enter at the keyboard You will be using the file text.txt to test your program. Print out all of the individual, unique words contained in the file, in alphabetical order Print out the number of unique words appearing in text.txt. Call your program: YourName-HwrklXa.py Make sure that your name appears as a comment at the beginning of the program as well as on the output display showing the unique words Homework IX-b Write a program that reads the contents of two text files and compares them in the following ways It should display a list of all the unique words contained in the union of both files. It should display a list of the words that only appear in both files. It should display a list of the words that appear in the first file but not the second It should display a list of the words that appear in the second file but not the first. It should display a list of the words that appear in either the first or second file but not both . Take particular care to be sure that words that are spelled the same, except for case are not considered two different words (e.g. "The" and "the" are the same word) . Take particular care to be sure that all punctuation is stripped away so that words like, "quick" and "quick," are not considered two different words. The two files you will compare are: first_file.txt and second_file.txt Call your program: YourName-HwrkiXb.py Again, make sure that you name appears as a comment at the beginning of the program as wel as on the output display showing the results.


Are there any questions left?
New questions in the section Engineering
Sign up for the IQClass
Answers from experts with no ads!
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Made with love
This website uses cookies to make IQClass work for you. By using this site, you agree to our cookie policy

Pleased to see you again

IQClass unlocks the learning potential of every child
  • Master useful skills
  • Improve learning outcomes
  • Share your knowledge
Create an account
Sign in
Recover lost password
Or log in with

Create an account

IQClass unlocks the learning potential of every child
  • Master useful skills
  • Improve learning outcomes
  • Share your knowledge
Create an account
Sign Up
Or sign up with
By signing up, you agree to the Terms of use and Privacy policy.
Looking for an answer to a question you need help with?
you have баллов