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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Dr. wisteria is a prominent chiropractor in the chicago area. she wants to provide a forum for her patients to discuss their health concerns and to seek and offer advice to other patients. which telecommunications tool is most appropriate for dr. wisteria's needs?
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
When building customer relationships through email what should you not do? question 2 options: utilize proper grammar, spelling, and punctuation type in all capital letters use hyperlinks rather than attachments respond to all emails within 24 hours
Answers: 1
question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
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
Mathematics, 20.09.2021 08:00
question
Geography, 20.09.2021 08:00
question
Social Studies, 20.09.2021 08:00
question
English, 20.09.2021 08:00
question
Mathematics, 20.09.2021 08:00
question
Biology, 20.09.2021 08:00