subject

Write a script named dif. py. this script should prompt the user for the names of two text files and compare the contents of the two files to see if they are the same. if they are, the script should simply output "yes". if they are not, the script should output "no", followed by the first lines of each file that differ from each other. the input loop should read and compare lines from each file. the loop should break as soon as a pair of different lines is found. below are examples of the program input and output along with relevant files: one. txt: this is text. abc 123 sameasone. txt: this is text. abc 123 differentfromone. txt this is text. xyz 123 comparing files that are the same: enter the first file name: one. txt enter the second file name: sameasone. txt yes comparing files that are different: enter the first file name: one. txt enter the second file name: differentfromone. txt no abc xyz

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:40
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
question
Computers and Technology, 22.06.2019 17:00
What allows you to create a wireless connection among your smart devices
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
Answers: 2
You know the right answer?
Write a script named dif. py. this script should prompt the user for the names of two text files and...
Questions
question
English, 13.01.2021 21:00
question
Mathematics, 13.01.2021 21:00
question
Mathematics, 13.01.2021 21:00
question
English, 13.01.2021 21:00
Questions on the website: 13722367