Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:50, tatumleigh04
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
image
Computers and Technology, 23.06.2019 16:00, CalCDanG
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
image
Computers and Technology, 23.06.2019 20:30, lucywood2024
What is the biggest difference between section breaks and regular page breaks
Answers: 1
image
Computers and Technology, 24.06.2019 10:20, savyblue1724707
Identify the publisher in this citation: carter, alan. a guide to entrepreneurship. new york: river’2008.print.
Answers: 3
Do you know the correct answer?
Write a script named dif. py. this script should prompt the user for the names of two text files and...

Questions in other subjects:

Konu
Computers and Technology, 30.11.2020 19:10