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
What different tests did the team perform to come up with a workable design?
I am Lyosha [343]
They ran different shapes and materials through a wind tunnel to see which shape and material would decrease energy output so that it takes in equal COthan it puts out.
5 0
4 years ago
Calculate the radius of gyration for a bar of rectangular cross section with thickness t and width w for bending in the directio
SVEN [57.7K]

Answer:

a)R= sqrt( wt³/12wt)

b)R=sqrt(tw³/12wt)

c)R= sqrt ( wt³/12xcos45xwt)

Explanation:

Thickness = t

Width = w

Length od diagonal =sqrt (t² +w²)

Area of raectangle = A= tW

Radius of gyration= r= sqrt( I/A)

a)

Moment of inertia in the direction of thickness I = w t³/12

R= sqrt( wt³/12wt)

b)

Moment of inertia in the direction of width I = t w³/12

R=sqrt(tw³/12wt)

c)

Moment of inertia in the direction of diagonal I= (w t³/12)cos 45=( wt³/12)x 1/sqrt (2)

R= sqrt ( wt³/12xcos45xwt)

4 0
3 years ago
A car accelerates from O to 60. miles per hour in 5.2 seconds. Calculate acceleration in m/s seconds. Calculate acceleration in
DochEvi [55]

Answer:

a=5.515\frac{m}{s^{2} }

Explanation:

The first thing we will do is convert the units. Miles per hour to meters per second.

1 mile=1609.34 mts.

1 hora=3600 segundos

Performing the operations

60\frac{mile}{h}=\frac{(60*1609.34)}{3600}\frac{m}{s}=26.822\frac{m}{s}

Now, we will use the acceleration formula

a=\frac{v}{t}

Where v = speed and t = time

Substituting the values ​​of t=5.2s

a=\frac{v}{t} =\frac{26.822\frac{m}{s} }{5.2s} =5.15\frac{m}{s^{2} }

7 0
3 years ago
What could be used as another word for electrical potential?
Marat540 [252]

Answer: C. Voltage

Explanation:

Here are some other words as well.

potential, voltage, potential drop, potential difference.

Answered by the ONE & ONLY #QUEEN aka #DRIPPQUEENMO!!!

HOPE THIS HELPED!!!

6 0
3 years ago
A gas cylinder is connected to a manometer that contains water. The other end of the manometer is open to the atmosphere, which
horrorfan [7]

Answer: the absolute static pressure in the gas cylinder is 82.23596 kPa

Explanation:

Given that;

patm = 79 kPa, h = 13 in of H₂O,

A sketch of the problem is uploaded along this answer.

Now

pA = patm + 13 in of H₂O ( h × density × g )

pA= 79 + (13 × 0.0254 × 9.8 × 1000/1000)

pA = 82.23596 kPa

the absolute static pressure in the gas cylinder is 82.23596 kPa

4 0
3 years ago
Other questions:
  • Teresa is emotionally volatile, particularly with friends and boyfriends. She is extremely dramatic about even the smallest disa
    15·1 answer
  • The four strokes in a four stroke cycle engine in proper order.
    7·1 answer
  • Determine the output torque To????????p????????, the speed reduction ratio of the transmission R, the tangential loads imposed o
    13·2 answers
  • Burn rate can be affected by: A. Variations in chamber pressure B. Variations in initial grain temperature C. Gas flow velocity
    15·1 answer
  • For an Otto cycle, plot the cycle efficiency as a function of compression ratio from 4 to 16.
    14·1 answer
  • What is the mechanical advantage of a pulley with 3 support ropes?
    6·1 answer
  • Which of the following explains the main reason to cut a piece of wood on the outside of the measurement mark?
    13·1 answer
  • Robots make computations and calculations using what part
    12·1 answer
  • Which step in the engineering design phase is requiring concussion prevention from blows up to 40 mph an example of?
    6·1 answer
  • This acronym is a reminder of the most common types of hazards or injuries caused by electricity.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!