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
LenKa [72]
4 years ago
13

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:
Engineering
1 answer:
Ainat [17]4 years ago
7 0

Answer:

1

Created on Nov 3, 2018 @author: ASLand

7import atexit

#Read, nanes of both files

Rrintll"Enter tvo files to be compared below

userliamel input ("Enter the nome of the first file: ")

userliame2 input("Enter the name of the second file: ")

ROpen each file

f1 - open(userNamel, r')

@17 f2 = opan(useriame 2, )

tread all the lines into a list

d1 f1.readlines ()

d2 f2.readlines()

re equivalent, print "Yes" else pri

oiterate, and conpare

#11

the

y

if dl == d2:

print("Yes")

atexit

elif for i in range(@, min(len (d1), len(d2))):

if di[i]!=d2[i]:

PCint("No")

print(d1[i])

pcint(d2[])

You might be interested in
Kieran and Kurt spend most of their day performing physical labor, aligning materials, and inspecting projects for quality and s
xxMikexx [17]

Answer:

Kieran is a Carpenter, and Kurt is a Drafter

Explanation:

Among all the professions listed, Kurt can only possibly be a Drafter.  A Drafter is an engineering technician who makes detailed technical drawings or plans for machinery, buildings, electronics, infrastructure, sections, etc. Drafters make use of computer software and manual sketches to convert the designs, plans, and layouts of engineers and architects into a set of technical drawings. All the other professions will at some point need for the professional to stand and work at an height above the ground except for a drafter, whose feet will remain on the ground at almost all times.

5 0
3 years ago
Read 2 more answers
Consider the control volume form of the basic laws. For the conservation of mass form for a control volume with mass flow into a
aleksandrvk [35]

Answer:

C) Dependent on the mass flows in and out.

Explanation:

Lets take control volume(CV)

Take

          m_i =inlet mass flow rate

          m_e =exit mass flow rate

If we take unsteady flow process then inlet mass can not be equal to exit mass.Some mass can store if inlet mass flow rate is high and exit mass flow rate  is low.

So mass of control volume

    m_{cv}=m_i-m_e.

so above we can say that mass of control volume dependent on inlet and exit mass.

5 0
3 years ago
For the system form of the basic laws, the momentum of a system can change as a result of: a. pressure acting on the system. b.
Ymorist [56]

Answer: F. All the above.

Explanation:

Basically, if an object is moving, it moves with a certain velocity and mass. Momentum of a body is a product of mass and velocity. The sum of momentum of individual bodies is equal to the entire system momentum. For instance, a block v is moving due to an applied force F, with a velocity V and the gravity g. Due to gravity, the weight is mg. Due to gravity, the weight is acting downward. Applied force is acting on the block surface area A.

Pressure = Surface force/Surface area.

Surface force is acting on the surface applied. So, acting pressure = Force applied/area.

Pressure and surface force is acting on the body. Body forces also act on the system. Forces due to gravity is also referred to as body force. As a result of weight of the box, Normal force produced by the rough surface is equal to the Weight. As a result of rough surface, frictional forces are produced which opposes the block to move forward. All the external forces create a net total force due to which the block move with a velocity and acceleration.

In Newton's second law, Ftotal is equal to mass × acceleration.

Therefore, we can conclude that momentum can change as a result of all these forces because mass × acceleration is related to total force and momentum is equal to mass × velocity.

7 0
3 years ago
Read 2 more answers
During casting and solidification, shrinkage includes: a)-Liquid contraction during cooling prior to solidification. b)-Contract
AysviL [449]

Answer:

(d) all of the above

Explanation:

The option (a) (b) and (c) all are the process of the casting and solidification shrinkage, all the three process are done one by one in casting and solidification shrinkage.

there are mainly three stages in casting and solidification shrinkage these are

  • liquid shrinkage
  • solid to liquid shrinkage
  • contraction process

so from given conclusion it is clear that the statement of option a b and c are correct so the option d will be the correct option

7 0
4 years ago
Jelena is 26 and has worked in the service industry for most of her work history. She is willing to advance her education and tr
katrin2010 [14]
Customer service

Since she has reckless driving and her record, anything involving driving of some sorts mechanics as well won’t work well with her!! Hope this helps
8 0
3 years ago
Other questions:
  • The principal value of a Pareto diagram is as a
    14·1 answer
  • Tadpoles raised in water with atrazine levels of 0.1 ppb should produce a higher percentage of male frogs with gonadal abnormali
    13·1 answer
  • An open 1- -m-diameter tank contains water at a depth of 0.7 m when at rest. As the tank is rotated about its vertical axis the
    5·2 answers
  • Indicate whether the following statements are true or false for an isothermal process: (A) Q=T(∆S). (B) ∆U=0.(C) The entropy cha
    5·1 answer
  • Write a function called pyramid(height) that acceptsa parameter ""height"". It then prints a pyramid of that height
    10·1 answer
  • Dimensional analysis: a)-Can be used to derive equations and non-dimensional numbers. b)-Helps in planning experiments. c)-Is an
    10·1 answer
  • Given the strings s1 and s2, not necessarily of the same length, create a new string consisting of alternating characters of s1
    5·1 answer
  • PLZZ HELP WILL GIVE BRAILYEST PLZZ HELP
    9·2 answers
  • Limestone scrubbing is used to remove SO2 in a flue gas desulfurization (FGD) system. Relevant reactions are given below. A lime
    8·1 answer
  • A service station has 10 employees who are responsible for checking in customers who bring their cars in to be serviced. The emp
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!