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, 21.06.2019 21:40
Write c function that can replace all the positive elements to 0 and negative to 1 in undefined length one-dimensional array. test your program in the main program by defining one-dimensional array of 6 elements
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
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 11:20
William travels a lot on business purpose. he needs to regularly communicate with his business partner. he also needs to send out weekly reports to his boss while he is traveling. which web-based application best suits william’s needs? (social media, webmail, wiki) is the best web-based application for william. he can access this application via the internet using a (digital cable, fax machine, web browser).
Answers: 1
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, 19.04.2021 19:50
Questions on the website: 13722363