SlideShare a Scribd company logo
PYTHON
File Analysis
Write a program that reads the contents of the two text files provided and compares them in the
following ways:
It should display a list of all the unique words contained in both files.
It should display a list of the words that 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.
Use SET operations to perform these analyses.

More Related Content

More from JamesPXNNewmanp

Q1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdf
Q1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdfQ1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdf
Q1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdf
JamesPXNNewmanp
 
Python CMSC 206 Please fix this code- send me what I should enter- and.pdf
Python CMSC 206 Please fix this code- send me what I should enter- and.pdfPython CMSC 206 Please fix this code- send me what I should enter- and.pdf
Python CMSC 206 Please fix this code- send me what I should enter- and.pdf
JamesPXNNewmanp
 
Psychiatrist from Munich who devised a classification of mental disord.pdf
Psychiatrist from Munich who devised a classification of mental disord.pdfPsychiatrist from Munich who devised a classification of mental disord.pdf
Psychiatrist from Munich who devised a classification of mental disord.pdf
JamesPXNNewmanp
 
provide project managers and their teams with access to informal organ.pdf
provide project managers and their teams with access to informal organ.pdfprovide project managers and their teams with access to informal organ.pdf
provide project managers and their teams with access to informal organ.pdf
JamesPXNNewmanp
 
Pseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdf
Pseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdfPseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdf
Pseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdf
JamesPXNNewmanp
 
Provide a substantive comnent to this post- Statistics in R is a pow.pdf
Provide a substantive comnent to this post-   Statistics in R is a pow.pdfProvide a substantive comnent to this post-   Statistics in R is a pow.pdf
Provide a substantive comnent to this post- Statistics in R is a pow.pdf
JamesPXNNewmanp
 
Project Pink initially costs Rs- 25-000- It generates the following ca.pdf
Project Pink initially costs Rs- 25-000- It generates the following ca.pdfProject Pink initially costs Rs- 25-000- It generates the following ca.pdf
Project Pink initially costs Rs- 25-000- It generates the following ca.pdf
JamesPXNNewmanp
 
proinsulin What triggers the closure of KATP channels and the subseque.pdf
proinsulin What triggers the closure of KATP channels and the subseque.pdfproinsulin What triggers the closure of KATP channels and the subseque.pdf
proinsulin What triggers the closure of KATP channels and the subseque.pdf
JamesPXNNewmanp
 
Producers and suppliers andtheir role in the housing stockshortage of.pdf
Producers and suppliers andtheir role in the housing stockshortage of.pdfProducers and suppliers andtheir role in the housing stockshortage of.pdf
Producers and suppliers andtheir role in the housing stockshortage of.pdf
JamesPXNNewmanp
 
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdfProblem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
JamesPXNNewmanp
 
Problem 9- (10 points) The mean and standard deviation of a random var.pdf
Problem 9- (10 points) The mean and standard deviation of a random var.pdfProblem 9- (10 points) The mean and standard deviation of a random var.pdf
Problem 9- (10 points) The mean and standard deviation of a random var.pdf
JamesPXNNewmanp
 
Problem 7-20.pdf
Problem 7-20.pdfProblem 7-20.pdf
Problem 7-20.pdf
JamesPXNNewmanp
 
Problem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdf
Problem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdfProblem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdf
Problem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdf
JamesPXNNewmanp
 
Problem 4 Let Xi-1in be independent and identically distributed random.pdf
Problem 4 Let Xi-1in be independent and identically distributed random.pdfProblem 4 Let Xi-1in be independent and identically distributed random.pdf
Problem 4 Let Xi-1in be independent and identically distributed random.pdf
JamesPXNNewmanp
 
Problem 3- (12-) Let X and Y be independent random variables with mean.pdf
Problem 3- (12-) Let X and Y be independent random variables with mean.pdfProblem 3- (12-) Let X and Y be independent random variables with mean.pdf
Problem 3- (12-) Let X and Y be independent random variables with mean.pdf
JamesPXNNewmanp
 
Problem 1- Use the pumping lemma for the regular language to prove tha.pdf
Problem 1- Use the pumping lemma for the regular language to prove tha.pdfProblem 1- Use the pumping lemma for the regular language to prove tha.pdf
Problem 1- Use the pumping lemma for the regular language to prove tha.pdf
JamesPXNNewmanp
 
Problem 1- truth values Given the truth values A false- B true- and C.pdf
Problem 1- truth values Given the truth values A false- B true- and C.pdfProblem 1- truth values Given the truth values A false- B true- and C.pdf
Problem 1- truth values Given the truth values A false- B true- and C.pdf
JamesPXNNewmanp
 
Prepare the Communication Plan based on the following STEP 1- IDENTIF.pdf
Prepare the Communication Plan based on the following  STEP 1- IDENTIF.pdfPrepare the Communication Plan based on the following  STEP 1- IDENTIF.pdf
Prepare the Communication Plan based on the following STEP 1- IDENTIF.pdf
JamesPXNNewmanp
 
Problem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdf
Problem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdfProblem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdf
Problem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdf
JamesPXNNewmanp
 
Preferred stock is often cailed a hybrid security because it has some.pdf
Preferred stock is often cailed a hybrid security because it has some.pdfPreferred stock is often cailed a hybrid security because it has some.pdf
Preferred stock is often cailed a hybrid security because it has some.pdf
JamesPXNNewmanp
 

More from JamesPXNNewmanp (20)

Q1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdf
Q1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdfQ1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdf
Q1- Given is the symbol of a 1-bit full adder- Please draw a diagram t.pdf
 
Python CMSC 206 Please fix this code- send me what I should enter- and.pdf
Python CMSC 206 Please fix this code- send me what I should enter- and.pdfPython CMSC 206 Please fix this code- send me what I should enter- and.pdf
Python CMSC 206 Please fix this code- send me what I should enter- and.pdf
 
Psychiatrist from Munich who devised a classification of mental disord.pdf
Psychiatrist from Munich who devised a classification of mental disord.pdfPsychiatrist from Munich who devised a classification of mental disord.pdf
Psychiatrist from Munich who devised a classification of mental disord.pdf
 
provide project managers and their teams with access to informal organ.pdf
provide project managers and their teams with access to informal organ.pdfprovide project managers and their teams with access to informal organ.pdf
provide project managers and their teams with access to informal organ.pdf
 
Pseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdf
Pseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdfPseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdf
Pseudopods are used by amoebas for locomotion- A- True B- False QUESTI.pdf
 
Provide a substantive comnent to this post- Statistics in R is a pow.pdf
Provide a substantive comnent to this post-   Statistics in R is a pow.pdfProvide a substantive comnent to this post-   Statistics in R is a pow.pdf
Provide a substantive comnent to this post- Statistics in R is a pow.pdf
 
Project Pink initially costs Rs- 25-000- It generates the following ca.pdf
Project Pink initially costs Rs- 25-000- It generates the following ca.pdfProject Pink initially costs Rs- 25-000- It generates the following ca.pdf
Project Pink initially costs Rs- 25-000- It generates the following ca.pdf
 
proinsulin What triggers the closure of KATP channels and the subseque.pdf
proinsulin What triggers the closure of KATP channels and the subseque.pdfproinsulin What triggers the closure of KATP channels and the subseque.pdf
proinsulin What triggers the closure of KATP channels and the subseque.pdf
 
Producers and suppliers andtheir role in the housing stockshortage of.pdf
Producers and suppliers andtheir role in the housing stockshortage of.pdfProducers and suppliers andtheir role in the housing stockshortage of.pdf
Producers and suppliers andtheir role in the housing stockshortage of.pdf
 
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdfProblem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
 
Problem 9- (10 points) The mean and standard deviation of a random var.pdf
Problem 9- (10 points) The mean and standard deviation of a random var.pdfProblem 9- (10 points) The mean and standard deviation of a random var.pdf
Problem 9- (10 points) The mean and standard deviation of a random var.pdf
 
Problem 7-20.pdf
Problem 7-20.pdfProblem 7-20.pdf
Problem 7-20.pdf
 
Problem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdf
Problem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdfProblem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdf
Problem 7 The Wechsler Adult Intelligence Scale is standardized to hav.pdf
 
Problem 4 Let Xi-1in be independent and identically distributed random.pdf
Problem 4 Let Xi-1in be independent and identically distributed random.pdfProblem 4 Let Xi-1in be independent and identically distributed random.pdf
Problem 4 Let Xi-1in be independent and identically distributed random.pdf
 
Problem 3- (12-) Let X and Y be independent random variables with mean.pdf
Problem 3- (12-) Let X and Y be independent random variables with mean.pdfProblem 3- (12-) Let X and Y be independent random variables with mean.pdf
Problem 3- (12-) Let X and Y be independent random variables with mean.pdf
 
Problem 1- Use the pumping lemma for the regular language to prove tha.pdf
Problem 1- Use the pumping lemma for the regular language to prove tha.pdfProblem 1- Use the pumping lemma for the regular language to prove tha.pdf
Problem 1- Use the pumping lemma for the regular language to prove tha.pdf
 
Problem 1- truth values Given the truth values A false- B true- and C.pdf
Problem 1- truth values Given the truth values A false- B true- and C.pdfProblem 1- truth values Given the truth values A false- B true- and C.pdf
Problem 1- truth values Given the truth values A false- B true- and C.pdf
 
Prepare the Communication Plan based on the following STEP 1- IDENTIF.pdf
Prepare the Communication Plan based on the following  STEP 1- IDENTIF.pdfPrepare the Communication Plan based on the following  STEP 1- IDENTIF.pdf
Prepare the Communication Plan based on the following STEP 1- IDENTIF.pdf
 
Problem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdf
Problem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdfProblem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdf
Problem 2- (11--) Let X and Y be independent Binomial(n-p) random vari.pdf
 
Preferred stock is often cailed a hybrid security because it has some.pdf
Preferred stock is often cailed a hybrid security because it has some.pdfPreferred stock is often cailed a hybrid security because it has some.pdf
Preferred stock is often cailed a hybrid security because it has some.pdf
 

Recently uploaded

Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 

Recently uploaded (20)

Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 

PYTHON File Analysis Write a program that reads the contents of the tw.pdf

  • 1. PYTHON File Analysis Write a program that reads the contents of the two text files provided and compares them in the following ways: It should display a list of all the unique words contained in both files. It should display a list of the words that 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. Use SET operations to perform these analyses.