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
Calculate the molar heat capacity of a monatomic non-metallic solid at 500K which is characterized by an Einstein temperature of
aleksandr82 [10.1K]

Answer:

Explanation:

Given

Temperature of solid T=500\ K

Einstein Temperature T_E=300\ K

Heat Capacity in the Einstein model is given by

C_v=3R\left [ \frac{T_E}{T}\right ]^2\frac{e^{\frac{T_E}{T}}}{\left ( e^{\frac{T_E}{T}}-1\right )^2}

e^{\frac{3}{5}}=1.822

Substitute the values

C_v=3R\times (\frac{300}{500})^2\times (\frac{1.822}{(1.822-1)^2})

C_v=3R\times \frac{9}{25}\times \frac{1.822}{(0.822)^2}

C_v=0.97\times (3R)            

6 0
3 years ago
What process is used to remove collodal and dissolved organic matter in waste water ​
Juli2301 [7.4K]

Answer:

Aerobic biological treatment process

Explanation:

Aerobic biological treatment process in which micro-organisms, in the presence of oxygen, metabolize organic waste matter in the water, thereby producing more micro-organisms and inorganic waste matter like CO₂, NH₃ and H₂O.

3 0
2 years ago
4.116 The lid of a roof scuttle weighs 75 lb. It is hinged at corners A and B and maintained in the desired position by a rod CD
babunello [35]

Answer:

(a) The magnitude of force is 116.6 lb, as exerted by the rod CD

(b) The reaction at A is (-72.7j-38.1k) lb and at B it is (37.5j) lb.

Explanation:

Step by step working is shown in the images attached herewith.

For this given system, the coordinates are the following:

A(0, 0, 0)

B(26, 0, 0)

And the value of angle alpha is 20.95°

Hope that answers the question, have a great day!

5 0
3 years ago
Earth completes one full ____ on its axis every 24 hours
mars1129 [50]

Answer:

rotation

Explanation:

I just answered this!

7 0
2 years ago
Read 2 more answers
There is evidence that liquid water existed on Mars at some time in the past. What is the evidence found indicating the presence
Norma-Jean [14]
There mag be water on Mars but it’s not very easy to spot, but that is besides the point,

Mars is a smaller planet then Earth, thus it has less gravity, meaning when water evaporates into the atmosphere of the planet the water slowly escapes into space, so there is less and less water on the planet.

Hope this helps!
5 0
3 years ago
Other questions:
  • Admission to an aquarium is $14 per person. There is also an IMAX theatre in the building, which charges $8 per ticket for a 3D
    8·1 answer
  • Which tool is used to pull the tapered shaft on a tie-rod end from its mating steering component?
    9·1 answer
  • Is a 68.75 and a 70 a pass in 5th grade?
    10·2 answers
  • What is the magnitude of the maximum stress that exists at the tip of an internal crack having a radius of curvature of 2.5×10-4
    13·1 answer
  • What is Euler's equation?
    6·1 answer
  • What should you use to turn the water off and open the door?
    7·2 answers
  • What organization which fire codes
    13·2 answers
  • Heat is applied to a rigid tank containing water initially at 200C, with a quality of 0.25, until the pressure reaches 8 MPa. De
    8·1 answer
  • What is MIDI in soumd and audio engineering ? ​
    12·1 answer
  • A dual-fluid heat exchanger has 10 lbm/s water entering at 100 F, 20 psia and leaving at 50 F, 20 psia. The other fluid is glyco
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!