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 22:40
In this lab, you complete a python program that calculates an employee's annual bonus. input is an employee's first name, last name, salary, and numeric performance rating. if the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. if the rating is 4 or higher, the rate is 0. the employee bonus is calculated by multiplying the bonus rate by the annual salary.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Which of the following is not a “fatal four” event?
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, 30.06.2019 10:30
Questions on the website: 13722366