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
Give two advantages of a four-high rolling mill opposed to a two-high rolling mill for the same output diameter.
uysha [10]

Answer:

<u>Four- high rolling mill </u>                              <u>Two-high rolling mill</u>

1.Small roll radius.That is why required  1.High roll radius.That is  required low power.           .                    why required high power.

2.  Low roll separating force.                   2.High roll separating

                                                                        force

7 0
4 years ago
Discuss with your neighbor your brain as a computer.
Misha Larkins [42]
Senors are a type of device that produce a amount of change to the output to a known input stimulus.
Input signals are signals that receive data by the system and outputs the ones who are sent from it. Hope this helps ;)
6 0
3 years ago
A rectangular plate casting has dimensions 200mm x 100mm x 20mm. The riser for this sand casting mold is in the shape of a spher
9966 [12]

Answer:

Diameter of riser =6.02 mm

Explanation:

Given that

Dimensions of rectangular plate is 200mm x 100mm x 20mm.

Volume of rectangle V= 200 x 100 x 20 mm^3

Surface area of rectangle A

A=2(200 x 100+100 x 20 +20 x 200)mm^2

So V/A=7.69

We know that

Solidification times given as

t=K\left(\dfrac{V}{A}\right)^2   -----1

Lets take diameter of riser is d

Given that riser is in spherical shape so V/A=d/6

And

Time for solidification of rectangle is 3.5 min then time for solidificartion of riser is 4.2 min.

Lets take \dfrac{V}{A}=M

\dfrac{M_{rac}}{M_{riser}}=\dfrac{7.69}{\dfrac{d}{6}}

Now from equation 1

\dfrac{3.5}{4.2}=\left(\dfrac{7.69}{\dfrac{d}{6}}\right)^2

So by solving this d=6.02 mm

So the diameter of riser is 6.02 mm.

3 0
3 years ago
Lithium at 20°C is BCC and has a lattice constant of 0.35092 nm. Calculate a value for the atomic radius of a lithium atom in na
Nutka1998 [239]

Answer:

the atomic radius of a lithium atom is 0.152 nm

Explanation:

Given data in question

structure = BCC

lattice constant  (a) = 0.35092 nm

to find out

atomic radius of a lithium atom

solution

we know structure is BCC

for BCC radius formula is \sqrt{3} /4 × a

here we have known a value so we put a in radius formula

radius =  \sqrt{3} /4 × a

radius =  \sqrt{3} /4 × 0.35092

radius = 0.152 nm

so the atomic radius of a lithium atom is 0.152 nm

5 0
3 years ago
Determine the resolution of a manometer required to measure the velocity of air at 50 m/s using a pitot-static tube and a manome
oksano4ka [1.4K]

Answer:

a)  Δh = 2 cm,  b) Δh = 0.4 cm

Explanation:

Let's start by using Bernoulli's equation for the Pitot tube, we define two points 1 for the small entry point and point 2 for the larger diameter entry point.

            P₁ + ½ ρ v₁² + ρ g y₁ = P₂ + ½ ρ v₂² + ρ g y₂

Point 1 is called the stagnation point where the fluid velocity is reduced to zero (v₁ = 0), in general pitot tubes are used  in such a way that the height of point 2 of is the same of point 1

           y₁ = y₂

subtitute

           P₁ = P₂ + ½ ρ v₂²

           P₁ -P₂ = ½ ρ v²

where ρ is the density of fluid  

now we measure the pressure on the included beforehand as a pair of communicating tubes filled with mercury, we set our reference system at the point of the mercury bottom surface

           ΔP =ρ_{Hg} g h - ρ g h

           ΔP =  (ρ_{Hg} - ρ) g h

as the static pressure we can equalize the equations

          ΔP = P₁ - P₂

         (ρ_{Hg} - ρ) g h = ½ ρ v²

         v = \sqrt{\frac{2 (\rho_{Hg} - \rho) g}{\rho } } \ \sqrt{h}

in this expression the densities are constant

        v = A  √h

       A =\sqrt{\frac{2(\rho_{Hg} - \rho ) g}{\rho } }

 

They indicate the density of mercury rhohg = 13600 kg / m³, the density of dry air at 20ºC is rho air = 1.29 kg/m³

we look for the constant

        A = \sqrt{\frac{2( 13600 - 1.29) \ 9.8}{1.29} }

        A = 454.55

we substitute

       v = 454.55 √h

to calculate the uncertainty or error of the velocity

         h = \frac{1}{454.55^2} \ v^2

       Δh = \frac{dh}{dv}   Δv

       \frac{\Delta h}{h } = 2 \ \frac{\Delta v}{v}

Suppose we have a height reading of h = 20 cm = 0.20 m

             

a) uncertainty 2.5 m / s ( 0.05)

        \frac{\delta v}{v} = 0.05

       \frac{\Delta h}{h} = 2 0.05  

       Δh = 0.1 h

       Δh = 0.1  20 cm

       Δh = 2 cm

b) uncertainty 0.5 m / s ( Δv/v= 0.01)

        \frac{\Delta h}{h} =  2 0.01

        Δh = 0.02 h

        Δh = 0.02 20

        Δh = 0.1 20 cm

        Δh = 0.4 cm = 4 mm

5 0
3 years ago
Other questions:
  • Marble A is placed in a hollow tube, and the tube is swung in a horizontal plane causing the marble to be thrown out. As viewed
    11·1 answer
  • Compare a series circuit powered by six 1.5-volt batteries to a series circuit powered by a single 9-volt battery. Make sure the
    6·1 answer
  • Psychologist who uses behavioral approach to therapy would probably try which of the following
    13·2 answers
  • What’s tree about freedom of expression
    11·1 answer
  • A local surf report provides the height of the wave from the trough to the crest of the wave. How does this relate to the wave’s
    11·1 answer
  • while performing a running compression test how should running compression compare to static compression
    5·1 answer
  • When a vechicle is being pushed manually, it should ___
    8·2 answers
  • Why is it important to have knowledge on abbreviations, sign and symbols in masonry servicing job in the construction business s
    10·1 answer
  • Why is it important to follow properly the different steps in painting and varnishing a product ?​
    12·1 answer
  • Free poînts lol Philippînes - cool<br>​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!