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
When the psychologist simply records the relationship between two variables...
Wewaii [24]
When a psychologist simply records the relationship between two variables without manipulating them, it is called a correlational study.

The observed relationship does not by itself reveal which variable causes the other. This is the directionally problem. Also, the relationship may be due to a third variable controlling both of the observed variables.
8 0
3 years ago
Tires can be recycled instead of thrown out.<br> True<br> False
Arisa [49]

Answer:

True :)

Explanation:

You can recycle it! Tire recycling is the most practical and environment-friendly way of disposing of old and worn-out tires. Due to their inherent durability, large volume and environment and health risks, tires are one of the most problematic sources of solid wastes.

Hope it helped have a nice day! :)

8 0
2 years ago
What is the force in kN of work done is 1.2 ms moves through 120m​
Semmy [17]

Answer:

\frac{1.2}{120}

0.01

5 0
2 years ago
CODE
zalisa [80]

Answer:

Explanation:

I'm not 100% this is what you want, but here it is:

2

3

13

8

11

A

13

6 0
3 years ago
Technician A says automotive gasoline engines run on the 2 stroke principal. Technician B says Diesel engine hace less compressi
d1i1m1o1n [39]

Answer:

both are incorect

Explanation:

2 stroke principal is a mix of gasoline and engine oil a normal gasoline engine does not run on 2 stroke fuel

technician B is also wrong Diesel engines generally generate much higher compersion than gasoline engines

3 0
2 years ago
Other questions:
  • Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylindrical containe
    5·1 answer
  • When fermentation units are operated with high aeration rates, significant amounts of water can be evaporated into the air passi
    13·1 answer
  • How are project deliverables determined?
    14·2 answers
  • A poundal is the force required to accelerate a mass of 1 lbm at a rate of 1 ft/(s^2). Determine the acceleration of an object o
    10·1 answer
  • If a machine uses LESS effort to overcome a given resistance force (if Fe is less than FR), it has an actual mechanical advantag
    13·1 answer
  • The distribution of SAT scores of all college-bound seniors taking the SAT in 2014 was approximately normal with mean μ=1497 and
    12·1 answer
  • CAD(computer-aided design) software and is used in__________and __________that show how to construct an object. Technical drawin
    15·1 answer
  • How can you contribute to achieved the mission of NSTP during pandemic in your society?
    7·1 answer
  • 14. An engine is brought into the shop with a
    15·1 answer
  • QUICK ASAP!!!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!