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 cooling system load is 96,000 BTUh sensible. How much chilled air is required to satisfy the load if the system is designed fo
Natalija [7]

Answer:

For 20^{\circ} - 5.556 lb/s

For 15^{\circ} - 7.4047 lb/s

Solution:

As per the question:

System Load = 96000 Btuh

Temperature, T = 20^{\circ}

Temperature rise, T' = 15^{\circ}

Now,

The system load is taken to be at constant pressure, then:

Specific heat of air, C_{p} = 0.24 btu/lb ^{\circ}F

Now, for a rise of 20^{\circ} in temeprature:

\dot{m}C_{p}\Delta T = 96000

\dot{m} = \frac{96000}{C_{p}\Delta T} = \frac{96000}{0.24\times 20} = 20000 lb/h = \frac{20000}{3600} = 5.556 lb/s

Now, for 15^{\circ}:

\dot{m}C_{p}\Delta T = 96000

\dot{m} = \frac{96000}{C_{p}\Delta T} = \frac{96000}{0.24\times 15} = 26666.667 lb/h = \frac{26666.667}{3600} = 7.4074 lb/s

4 0
2 years ago
What else will change, if you change the point of view
JulijaS [17]

Answer:

We would need background context,

Explanation:

Then I would be happy to help!

4 0
2 years ago
A concentrated load P is applied to the upper end of a 1.47-m-long pipe. The outside diameter of the pipe is D = 112 mm and the
myrzilka [38]

Answer:

Pmax = 38251.73 N

Explanation:

Given info

L = 1.47 m

D = 112 mm ⇒ R = D/2 = 112/2 mm = 56 mm

d = 101 mm  ⇒ r = D/2 = 101/2 mm = 50.5 mm

a) We can apply the following equation in order to get Q (First Moment of Area):

Q = 2*(A₁*y₁-A₂*y₂)

where

A₁ = π*R² = π*(56 mm)² = 3136 π mm²  

y₁ = 4*R/(3*π) = 4*56/(3*π) mm = 224/(3*π) mm

A₂ = π*r² = π*(50.5 mm)² = 2550.25 π mm²

y₂ = 4*r/(3*π) = 4*50.5/(3*π) mm = 202/(3*π) mm

then

Q = 2*(3136 π mm²*224/(3*π) mm-2550.25 π mm²*202/(3*π) mm)

⇒ Q = 62437.833 mm³

b) If  τallow = 83 MPa = 83 N/mm²

P = ?

We can use the equation

τ = V*Q / (t*I)   ⇒  V = τ*t*I / Q

where

t = D - d = 112 mm - 101 mm = 11 mm

I = (π/64)*(D⁴-d⁴) = (π/64)*((112 mm)⁴-(101 mm)⁴) = 2615942.11 mm⁴

Q = 62437.833 mm³

we could also use this equation in order to get Q:

Q = (4/3)*(R³-r³)

⇒  Q = (4/3)*((56 mm)³-(50.5 mm)³) = 62437.833 mm³

then we have

V = (83 N/mm²)*(11 mm)*(2615942.11 mm⁴) / (62437.833 mm³)

⇒ V = 2942.255 N

Finally Pmax = V = 38251.73 N

6 0
3 years ago
Think of one example where someone would need to calculate the net force on a person at the waater park
ValentinkaMS [17]
Well Bob would need to calculate to net force of someone going down a water slide. Since the person is going down the slide, the person will go faster, depending on their mass/weight and the gravitational pull.
7 0
3 years ago
Two resistors, A and B, individually connect to a 9V battery. A student notices that resistor A is warmer than resistor B. Which
dybincka [34]

Answer:

Resistor B

Explanation:

Since resistance is the opposition to the flow of current in a circuit,

first let assume the two resistors are connected in parallel to the voltage, recall that when connection is in parallel, the different amount of current pass through the resistors depending on the value with the small resistor having  a lower resistance effect hence higher current will pass through

The energy dissipated in each resistor can be calculated as

E=\frac{1}{2}IR^{2}t.

from the formula we can conclude that the energy value will be higher for the resistor with small resistance value. hence more heating effect which will cause it to be warm.

Also when connected individually the current flow from the voltage source will pass through the resistor which when we calculate the energy dissipated, the resistor with smaller value will be higher because it will draw more current which will in turn lead to a heating effect and cause the resistor to be warm. Hence we can conclude that the resistance B has greatest resistance value.

4 0
2 years ago
Other questions:
  • 4.
    6·2 answers
  • A rigid tank with a volume of 4 m^3 contains argon at 500 kPa and 30 deg C. It is connected to a piston cylinder (initially empt
    14·1 answer
  • Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to
    5·1 answer
  • Someone claims that the shear stress at the center of a circular pipe during fully developed laminar flow is zero. Do you agree
    12·1 answer
  • If a ball is dropped from a height its velocity will increase until it hits the ground, assuming that aerodynamic drag due to th
    6·1 answer
  • The base class Pet has attributes name and age. The derived class Dog inherits attributes from the base class Pet class and incl
    10·1 answer
  • In software engineering how do you apply design for change?
    13·1 answer
  • Discuss the ethics of the circumstances that resulted in the Columbia shuttle disaster. Considering the predictions that were ma
    5·1 answer
  • What drives up the cost of consumables?
    6·1 answer
  • Please answwr the above question screenshot.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!