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
Gold forms a substitutional solid solution with silver. Compute the number of gold atoms per cubic centimeter for a silver-gold
evablogger [386]

Answer:

Compute the number of gold atoms per cubic centimeter = 9.052 x 10^21 atoms/cm3

Explanation:

The step by step and appropriate substitution is as shown in the attachment.

From number of moles = Concentration x volume

number of moles = number of particles/ Avogadro's number

Volume = mass/density, the appropriate derivation to get the number of moles of atoms

5 0
3 years ago
Airflow through a long, 0.15-m-square air conditioning duct maintains the outer duct surface temperature at 10°C. If the horizon
Ulleksa [173]

The complete Question is:

Airflow through a long, 0.15-m-square air conditioning duct maintains the outer duct surface temperature at 10°C. If the horizontal duct is uninsulated and exposed to air at 35°C in the crawlspace beneath a home, what is the heat gain per unit length of the duct? Evaluate the properties of air at 300 K. For the sides of the duct, use the more accurate Churchill and Chu correlations for laminar flow on vertical plates.

What is the Rayleigh number for free convection on the outer sides of the duct?

What is the free convection heat transfer coefficient on the outer sides of the duct, in W/m2·K?

What is the Rayleigh number for free convection on the top of the duct?  

What is the free convection heat transfer coefficient on the top of the duct, in W/m2·K?

What is the free convection heat transfer coefficient on the bottom of the duct, in W/m2·K?

What is the total heat gain to the duct per unit length, in W/m?

Answers:

- 7709251  or 7.709 ×10⁶

- 4.87

- 965073

- 5.931 W/m² K

- 2.868 W/m² K

- 69.498 W/m

Explanation:

Find the given attachments for complete explanation

4 0
3 years ago
A disk of radius 2.1 cm has a surface charge density of 5.6 µC/m2 on its upper face. What is the magnitude of the electric field
Assoli18 [71]

Answer:

=6.3*10^3 N/C

Explanation:

solution:

from this below equation (1)

E=σ/2εo(1-\frac{z}{\sqrt{z^2-R^2} } )...........(1)

we obtain:

=5.6*10^-6 \frac{c}{m^2} /2(8.85*10^-12\frac{c^2}{N.m^2} ).(1-\frac{9.5 cm}{\sqrt{9.5^2-2.1^2} } )

=6.3*10^3 N/C

8 0
3 years ago
You are preparing to exit from an expressway. You should begin slowing to the posted safe
wlad13 [49]

Answer:

Your answer will be B: At least 100 feet after leaving the expressway

8 0
3 years ago
Read 2 more answers
I wish to have a computer whose machine-level instructions are all 32 bits each. If I want to have all instructions of the form
melisa1 [442]

Answer:

Maximum number that can be represented by 13 bits  is 8192 Instructions

Explanation:

number of instructions = 1000

number of bits = log(1000) x number of register

                          = 6 bits

Since the complete instruction must have 32 bits, then

remaining number of bits = 32 - 6 = 236

number of registers in instruction = 2

number of bits per register = 26/2 = 13

Maximum number that can be represented by 13 bits = 2^{n}

                       = 2¹³ = 8192

4 0
3 years ago
Other questions:
  • A 1000 W iron utilizes a resistance wire which is 20 inches long and has a diameter of 0.08 inches. Determine the rate of heat g
    12·1 answer
  • In the lab, a container of saturated soil had a mass of 113.27 g before it was placed in the oven and100.06 g after the soil had
    15·1 answer
  • Two streams of air enter a control volume: stream 1 enters at a rate of 0.05 kg / s at 300 kPa and 380 K, while stream 2 enters
    13·1 answer
  • A 6-pole, 50 Hz squirrel cage induction motor has rotor resistance and standstill reactance referred to stator of 0.2 ohm and 1
    7·1 answer
  • Suppose that the time (in hours) required to repair a machine is an exponentially distributed random variable with parameter ???
    13·1 answer
  • The convection heat transfer coefficient for a clothed person standing in moving air is expressed as h 5 14.8V0.69 for 0.15 , V
    6·2 answers
  • How to draw the output voltage waveform rectifier
    8·1 answer
  • What car is this? I thinks its a nissan 240sx but i dont know
    11·1 answer
  • Read the passage.
    9·1 answer
  • What current must flow if 0.24 coulombs is to be transferred in 15ms?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!