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
A 800-MW steam power plant, which is cooled by a nearby river, has a thermal efficiency of 40 percent. Determine the rate of hea
Arturiano [62]

Answer:

Rate of heat transfer to river=1200MW

So the actual amount of heat rejected ti the river will be less as there will some heat loss to surrounding and in pipes

Explanation:

In order to find the actual heat transfer rate is lower or higher than its value we will first find the rate of heat transfer to power plant:

Efficiency=\frac{work}{heat transfer to power plant}

Heat transfer=\frac{work}{Efficiency\\} \\\\Heat transfer=\frac{800}{0.40}\\\\Heat transfer=2000MW

From First law of thermodynamics:

Rate of heat transfer to river=heat transfer to power plant-work done

Rate of heat transfer to river=2000-800

Rate of heat transfer to river=1200MW

So the actual amount of heat rejected ti the river will be less as there will some heat loss to surrounding and in pipes.

4 0
3 years ago
A motor is mounted on a platform that is observed to vibrate excessively at an operating speed of 6000 rpm producing a 250-N for
vichka [17]

Answer:

The amplitude of the absorbed mass can be found

for ka:

X_{a} =0.002m=\frac{F_{0} }{K_{a} } =\frac{250}{K_{a} } =125000N/m

now

w^2=\frac{K_{a} }{m_{a} } \\m_{a} =\frac{K_{a} }{w^2} =\frac{125000}{[6000*2\pi /60]^2} =0.317kg

4 0
3 years ago
X²-12x=0 ПЖ срочно реально решите помагие ​
nika2105 [10]

Answer:

формула pq sry i dont speak russian lol but thats the solution of the equation

4 0
2 years ago
A fisherman tries to escape a flash flood by walking up the 10 degree hill. If the water is rising at 0.11 m/s, how fast must he
FromTheMoon [43]

10.5 mph I’m pretty sure so so sorry if I’m wrong

6 0
3 years ago
Read 2 more answers
The ___________ section of the bid package might include information concerning provisions for water and other utilities, sanita
dexar [7]

Answer:

Procurement Process

Explanation:

Procurement Process describes the series of activities that an organization partakes in to get products or services in order to achieve their goals. The choice of the procurement process is very important for the success of a construction project.

So during a bidding process, the procurement process is section where the organization will need to get water and other utilities, sanitation equipment or storage needed for the success of a construction project.

3 0
3 years ago
Other questions:
  • The engine of a 2000kg car has a power rating of 75kW. How long would it take (seconds) to accelerate from rest to 100 km/hr at
    10·1 answer
  • A structural component in the shape of a flat plate 29.6 mm thick is to be fabricated from a metal alloy for which the yield str
    11·1 answer
  • a triangle is defined by the three vertices. write the following functions of the triangle class assume that the point class has
    7·1 answer
  • A simple Rankine cycle coal-fired power plant has given states identified in the following table. The power plant produces 2.1 b
    9·1 answer
  • Describe with an example how corroded structures can lead to environment pollution? ​
    13·1 answer
  • How many times has the ITU-R revised the CCIR 601 international standard? A. four B. five C. six D. seven
    8·1 answer
  • if when you put your shirt in your pants, your shirt is tucked, does that mean when your shirt is over your pants, your pants ar
    6·2 answers
  • GMA MIG weiding is a
    7·1 answer
  • Which of the following is a Dashboard Scoreboard for alignment of the business where information is constantly flowing through t
    5·1 answer
  • What is another term for the notes that a reader can add to text in a word-processing document?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!