1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leokris [45]
3 years ago
5

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.
Computers and Technology
1 answer:
Andrej [43]3 years ago
8 0

Answer:

first = input("enter first file name: ")

second = input("enter second file name: ")

file_one = open(first, 'r')

file_two = open(second, 'r')

if file_one.read() == file_two.read():

   print("Both files are the same")

else:

   print("Different files")

file_one.close()

file_two.close()

Explanation:

The python module above is a procedural program. The first two lines ask for user inputs for both file names in string, then the files are opened and compared with the if-statement. At the end of the program, the files are closed to avoid leakage.

You might be interested in
Advantages and disadvantages of technology
Elina [12.6K]
Technology has a lot of advantages and disadvantages. Few of notable advantages of technology are the fast and easy access to information with the help of internet, the improvised ways of communication like e-mails, and the gadgets or software applications to speed up work. For the disadvantages, the most noticeable effect is the technology related diseases such as the blurring vision caused from the radiation of mobile phones.
6 0
3 years ago
Que son los sistemas de control con retroalimentacion
iren2701 [21]
Existen 2 clases comunes:
sistema de lazo abierto: la salida no efecto sobre el sistema
sistema de lazo cerrado: la toma de desiciones del sistema de la entrada si no también de la salida
5 0
4 years ago
What customization feature can you use to create a cohesive look and feel for your presentations
yan [13]

B.Custom Themes

I have to add text so I can post this answer

5 0
4 years ago
Which one of the following business names would be rated Incorrect for name accuracy? Answer McDonald's McDonald's H&M McDon
Damm [24]

McDonald's H&M McDonalds Inc is incorrect for name accuracy.

Explanation:

The correct Name is McDonald's. But Mc Donald's H&M and McDonalds inc is incorrect for name accuracy.

McDonald's is a fast-food company based in America. It has its retail outlets throughout the world. It is very famous for its burgers and french fries. It is the world's second-largest employer in the private sector. It is a symbol of globalization as it has its outlets throughout the world.

6 0
4 years ago
In the software development process, which review studies the software design before it is released for coding?
marta [7]

1. In the software development process, the <u>software requirement</u> review studies the software design before it is released for coding.

2. <u>Audits</u> and walkthroughs are additional types of reviews performed in the software development process.

<h3>What is software development?</h3>

Software development can be defined as a process through which a software application (program) that is used to perform specific tasks on a computer is conceived, designed, developed (programmed), documented, tested and reviewed.

<h3>What is a software review?</h3>

A software review refers to a process that involves the analysis and examination of a software application (program) by a software developer, computers (robots), project personnel, end users, or user representatives for comment or approval on specifications and standards.

<h3>Types of reviews in software design.</h3>

In the software development process, there are three (3) main types of reviews and these include the following:

  • Preliminary design review (PDR)
  • Critical design review (CDR)
  • Software requirements review (SRR)

Furthermore, the additional types of reviews performed in the software development process are:

  1. Inspection
  2. Code review
  3. Technical review
  4. Pair programming
  5. Audit review

Read more on software development here: brainly.com/question/25760458

8 0
3 years ago
Other questions:
  • To use files in a c++ program you must include the ________ header file.
    15·1 answer
  • Your company is implementing a wireless network and is concerned that someone from a competing company could stand outside the b
    14·1 answer
  • What is the full word of"VPN"?​
    15·2 answers
  • When should recursion be avoided?
    9·1 answer
  • Which of the following things could you do in order to tell if a pair of colors has strong contrast? A. Look at the colors on th
    12·1 answer
  • An alteration threat violates information integrity. <br> a. True <br> b. False
    13·1 answer
  • Which type of CPU instruction performs arithmetic calculations and stores the results in memory?
    14·2 answers
  • You are given an integer N, followed by N lines of input (1 &lt;= N &lt;= 100). Each line of input contains one or several words
    8·1 answer
  • Plsssssssss help me​
    8·1 answer
  • TCP and the User Datagram Protocol (UDP) provide _________ between processes on any two of those hosts. A. address translation B
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!