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]
3 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]3 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
Answer my question I will mark brainliest
Iteru [2.4K]

Answer:

150

Explanation:

Mark me Brainliest

6 0
3 years ago
Read 2 more answers
The coefficient of static friction for both wedge surfaces is μw=0.4 and that between the 27-kg concrete block and the β=20° inc
balandron [24]

Assuming  the wedge has an angle of 5°.The minimum value of the force P that is required to begin moving the block up the incline is: 322.84 N.

<h3>Minimum value of force P</h3>

First step

Using this formula to find the weight of the block

W=mg

W=27×9.81

W=264.87 N

Second step

Angles of friction ∅A and ∅B

∅A=tan^-1(μA)

∅A=tan^-1(0.70)

∅A=34.99°

∅B=tan^-1(μB)

∅B=tan^-1(0.40)

∅B=21.80°

Third step

Equate the sum of forces in m-direction to 0 in order to find the reaction force at B.

∑fm=0

W sin (∅A+20°)  + RB cos (∅B+∅A)=0

264.87 sin(34.99°+20°) + RB cos (21.80°+34.99°)=0

216.94+0.5477Rb=0

RB=216.94/0.5477

RB=396.09 N

Fourth step

Equate the sum of forces in x-direction to 0 in order to find force Rc.

∑fx=0

RB cos (∅B) - RC cos (∅B+ 5°)=0

396.09 cos(21.80°) - RC cos (21.80°+5°)=0

RC=396.09 cos(21.80°)/cos(26.80°)

RC=412.02 N

Last step

Equate the sum of forces in y-direction to 0 in order to find force P required to move the block up the incline.

∑fy=0

RB sin (∅B) + RC sin (∅B)-P=0

P=Rb sin (∅B) + RC sin (5°+∅B)

P=396.09 sin(21.80°) +412.02sin (5°+21.80°)

P=322.84 N

Inconclusion the minimum value of the force P that is required to begin moving the block up the incline is: 322.84 N.

Learn more about Minimum value of force P here:brainly.com/question/20522149

7 0
2 years ago
Diffrent ways to make a header above a window
Oliga [24]

Answer: double click at the top of the page. Or you can also go to home file and click add heading.

Explanation:

5 0
3 years ago
Determine the following parameters for the water having quality x=0.7 at 200 kPa:
ra1l [238]

Solution :

Given :

Water have quality x = 0.7 (dryness fraction) at around pressure of 200 kPa

The phase diagram is provided below.

a). The phase is a standard mixture.

b). At pressure, p = 200 kPa, T = $T_{saturated}$

   Temperature = 120.21°C

c). Specific volume

  $v_{f}= 0.001061, \ \ v_g=0.88578 \ m^3/kg$

  $v_x=v_f+x(v_g-v_f)$

       $=0.001061+0.7(0.88578-0.001061)$

       $=0.62036 \ m^3/kg$

d). Specific energy (u_x)

    $u_f=504.5 \ kJ/kg, \ \ u_{fg}=2024.6 \ kJ/kg$

   $u_x=504.5 + 0.7(2024.6)$

         $=1921.72 \ kJ/kg$

e). Specific enthalpy $(h_x)$

   At $h_f = 504.71, \ \ h_{fg} = 2201.6$

   h_x=504.71+(0.7\times 2201.6)

        $= 2045.83 \ kJ/kg$

f). Enthalpy at m = 0.5 kg

  $H=mh_x$

       $= 0.5 \times 2045.83$

       = 1022.91 kJ

7 0
3 years ago
Which of the following conditions were present in over 80% of paddling fatalities from 1995-2000?
Minchanka [31]

Answer:

80% of the people that were killed weren't wearing a safety flotation device ( in correct terminology Personal Flotation Device, or PFD )

Explanation:

Hence they drowned due to the lack of safety.

3 0
3 years ago
Other questions:
  • Carbon dioxide steadily flows into a constant pressure heater at 300 K and 100 kPa witha mass flow rate of 9.2 kg/s. Heat transf
    11·1 answer
  • What is the stress concentration factor of a shaft in torsion, where D=1.25 in. and d=1 in. and the fillet radius is, r=0.2 in.a
    7·1 answer
  • When you are configuring data deduplication, you must choose a usage type for the volume you are configuring. Which of the follo
    8·1 answer
  • TOPO NÀO CÓ CẤU HÌNH ĐA ĐIỂM
    15·2 answers
  • Which option identifies the step skipped in the following scenario?
    9·2 answers
  • How do you build a house.
    15·1 answer
  • How many ase certifications are there for automotive technicians?
    7·1 answer
  • A 35 ft long solid steel rod is subjected to a load of 8,000 lb. This load causes the rod to stretch 0.266 in. The modulus of el
    9·1 answer
  • What’s the answer???
    9·1 answer
  • What are the horizontal structures beneath a slab that help transfer the load from the slab to the columns?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!