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
coldgirl [10]
3 years ago
8

Suppose the Bookstore is processing an input file containing the titles of books in order to remove duplicates from their list.

Write a program that reads all of the titles from an input file called bookTitles.txt and writes them to an output file called noDuplicates.txt. When complete, the output files should contain all unique titles found in the input file.
Engineering
1 answer:
mash [69]3 years ago
6 0

Answer:

books = []

   fp = open("bookTitles.txt")

   for line in fp.readlines():

       title = line.strip()

       if title not in books:

           books.append(title)

   fp.close()

   fout = open("noDuplicates.txt", "w")

   for title in books:

       print(tile, file=fout)

   fout.close()

except FileNotFoundError:

   print("Unable to open bookTitles.txt")

You might be interested in
Technician A states that a brake lathe is used to make a used brake rotor surface "like new". Technician B states that a brake l
nikitadnepr [17]

Answer:

Both Technician A and B are correct.

Explanation: A brake lathe is a special tool used to improve or work on the surface of brake pads it helps to smoothen the surface.

Brake lathe has been found to be very effective in removing rusts in rotors and unevenness in the brake pad surfaces in order to ensure the efficiency and effectiveness of the brake system of a vehicle. Hence, a brake lathe helps to make brake rotor surface as smooth as possible.

7 0
2 years ago
Kinetic energy is defined as energy of an object in:
Murrr4er [49]

your answer is c. motion

5 0
3 years ago
Read 2 more answers
Just some random stufff
NeTakaya

Answer:

Nice!

Explanation:

5 0
3 years ago
Pipe Diameter and Reynolds Number. An oil is being pumped inside a 10.0-mm-diameter pipe at a Reynolds number of 2100. The oil d
alexdok [17]

Answer:

The velocity in the pipe is 5.16m/s. The pipe diameter for the second fluid should be 6.6 mm.

Explanation:

Here the first think you have to consider is the definition of the Reynolds number (Re) for flows in pipes. Rugly speaking, the Reynolds number is an adimensonal parameter to know if the fliud flow is in laminar or turbulent regime. The equation to calculate this number is:

Re=\frac{\rho v D}{\mu}

where \rhois the density of the fluid, \mu is the viscosity, D is the pipe diameter and v is the velocity of the fluid.

Now, we know that Re=2100. So the velocity is:

v=\frac{Re*\mu}{\rho*D} =\frac{2100*2.1x10^{-2}Pa*s }{855kg/m^3*0.01m} =5.16m/s

For the second fluid, we want to keep the Re=2100 and v=5.16m/s. Therefore, using the equation of Reynolds number the diameter is:

D=\frac{Re*\mu}{\rho*v} =\frac{2100*1.5x10^{-2}Pa*s}{925kg/m^3*5.16m/s}=6.6 mm

8 0
3 years ago
The diagram illustrates a method of producing plastics called​
hodyreva [135]

Answer:

polymerisation,

Explanation:

6 0
2 years ago
Other questions:
  • An inflatable structure has the shape of a half-circular cylinder with hemispherical ends. The structure has a radius of 40 ft w
    6·1 answer
  • The type of current that flows from the electrode across the arc to the work is called what?
    5·1 answer
  • Thermal conductivity of AISI 316 Stainless Steel at 90ºC is 14.54 W/m K. Convert this value to IP system.
    8·1 answer
  • Compare the tensile load capacity of a 5/16-18 UNC thread and a 5/16-24 UNF thread made of the same material.
    6·1 answer
  • A rotor in a compressor stage has a mean blade radius of 0.285 m and an angular rotor velocity of 8500 RPMs. The static temperat
    9·1 answer
  • Ordan has _ 5 8 can of green paint and _ 3 6 can of blue paint. If the cans are the same size, does Jordan have more green paint
    15·1 answer
  • Which of the following addresses future implications of design and process decisions?
    5·1 answer
  • 3. Aqueous cleaners are
    11·1 answer
  • Technician a s ays a shorted circuit can generate excessive heat. technician b says a shorted circuit will cause the circuit pro
    10·1 answer
  • When starting up a dual fuel system, the temperature rise method for determining airflow cannot be used with the compressor cycl
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!