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
Quantitative meaning
pychu [463]

Answer:

Explanation:

relating to, measuring, or measured by the quantity of something rather than its quality.Often contrasted with qualitative.

6 0
3 years ago
Read 2 more answers
thì nghiệm nén xác định cường độ của bê tông trên ba mẫu thí nghiệm hình trụ HxD=300x150(mm). kết quả thu được lực phá hoại P1=4
adell [148]

spanish

Explanation:

the above question is written in spanish

5 0
3 years ago
A horizontal curve is being designed for a new two-lane highway (12-ft lanes). The PI is at station 250 + 50, the design speed i
kogti [31]

Answer

given,

Speed of vehicle = 65 mi/hr

                            = 65 x 1.4667 = 95.33 ft/s

e = 0.07 ft/ft

f is the lateral friction, f = 0.11

central angle,Δ = 38°

The PI station is

PI = 250 + 50

   = 25050 ft

using super elevation formula

e + f = \dfrac{v^2}{rg}

0.07 + 0.11 =\dfrac{95.33^2}{r\times 32.2}

r = \dfrac{95.33^2}{32.2\times 0.18}

  r = 1568 ft

As the road is two lane with width 12 ft

R = 1568 + 12/2

R = 1574 ft

Length of the curve

L = \dfrac{\piR\Delta}{180}

L = \dfrac{\pi\times 1574\times 38}{180}

L = 1044 ft

Tangent of the curve calculation

  T = R tan(\dfrac{\Delta}{2})

  T = 1574 tan(\dfrac{38}{2})

      T = 542 ft

The station PC and PT are

 PC = PI - T

 PC = 25050 - 542

       = 24508 ft

       = 245 + 8 ft

PT = PC + L

     = 24508 + 1044

     =25552

     = 255 + 52 ft

the middle ordinate calculation

MO = R(1-cos\dfrac{\Delta}{2})

MO = 1574\times (1-cos\dfrac{38}{2})

     MO = 85.75 ft

degree of the curvature

D = \dfrac{5729.578}{R}

D = \dfrac{5729.578}{1574}

D = 3.64°

8 0
4 years ago
What is the benefit of theories? they are easily disproven they are written by famous people they were applying every circumstan
OlgaM077 [116]

Answer:

A scientific theory is an explanation of an aspect of the natural world and universe that has been repeatedly tested and verified in accordance with the scientific method, using accepted protocols of observation, measurement, and evaluation of results. Where possible, theories are tested under controlled conditions in an experiment. In circumstances not amenable to experimental testing, theories are evaluated through principles of abductive reasoning. Established scientific theories have withstood rigorous scrutiny and embody scientific knowledge.

A scientific theory differs from a scientific fact or scientific law in that a theory explains "why" or "how": a fact is a simple, basic observation, whereas a law is a statement (often a mathematical equation) about a relationship between facts. For example, Newton’s Law of Gravity is a mathematical equation that can be used to predict the attraction between bodies, but it is not a theory to explain how gravity works. Stephen Jay Gould wrote that "...facts and theories are different things, not rungs in a hierarchy of increasing certainty. Facts are the world's data. Theories are structures of ideas that explain and interpret facts.

mark me as brainlist

3 0
2 years ago
A large retail organization previously divided work among its four employee-benefits staff into distinct specializations. One pe
Sever21 [200]

Answer:

Sense of ownership

Explanation:

Even thought the question seems incomplete or properly asked, but from the narrative thus far in the asked question, the answer suggests that the restructuring will most likely increase the employees sense of ownership which is the right answer to the question intended to ask.

Sense of ownership in employees basically is the mental feeling of having a stake in the shares or ownership of a company. A sense of ownership can not be delegated. It is what drives an employee to want to do more for a company leading to the greater success of the organisation.

In summary, One staff member is responsible for all employee-benefits inquiries from anyone in a particular geographic region Simply indicate a Sense of ownership

7 0
4 years ago
Other questions:
  • Air enters the compressor of a gas turbine at 100 kPa, 300 K. The air is compressed in two stages to 900 kPa, with intercooling
    10·1 answer
  • A gear box’s shaft is made of a hollow circular steel tube with allowable yield stress equal to σa????????o???? . The shaft is l
    7·1 answer
  • Show the bias polarities and depletion regions of an npn BJT in the normal active, saturation, and cutoff modes of operation. Dr
    15·1 answer
  • Calculate the density of a hydraulic oil in units of kg/m^3 knowing that the density is 1.74 slugs/ft^3. Then, calculate the spe
    7·1 answer
  • When you see a street with white markings only, what kind of street is it?
    7·1 answer
  • An open-open organ pipe is 73.5 cm long. An open-closed pipe has a fundamental frequency equal to the third harmonic of the open
    11·2 answers
  • Write a CPP program that prompts the user to enter the number of lines and generates the following pattern of stars. If the nonn
    15·1 answer
  • Cooling fans can be controlled by
    13·1 answer
  • A plot of land is an irregular trangle with a base of 122 feet and a height of 47 feet what is the area of the plot?
    13·1 answer
  • A mixture of octane, C8H18, and air flowing into a combustor has 60% excess air and 1 kmol/s of octane. What is the mole flow ra
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!