Помогите решить логическую ошибку


Автор темы
    with open('cat.txt', 'r') as list_a:
     mn = list_a.read()
except FileNotFoundError:

The Project Gutenberg eBook of Practical hints to builders and those
contemplating building, by National Sheet Metal Roofing Co.

This eBook is for the use of anyone anywhere in the United States and
most other parts of the world at no cost and with almost no restrictions
whatsoever. You may copy it, give it away or re-use it under the terms
of the Project Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United States, you
will have to check the laws of the country where you are located before
using this eBook.

Title: Practical hints to builders and those contemplating building
Facts worth considering relating to foundation, cellar, kitchen,
chimney, cistern, brick-work, mortar, heating, ventilation, the
roof, and many items of interest to builders...

Author: National Sheet Metal Roofing Co.

Release Date: June 10, 2022 [eBook #68285]

Language: English

Produced by: Charlene Taylor and the Online Distributed Proofreading
Team at https://www.pgdp.net (This file was produced from
images generously made available by The Internet
Archive/American Libraries.)



=Fourth Edition.= (145,000)

Facts Worth Considering
_Foundation, Cellar, Kitchen, Chimney, Cistern, Brick-work, Mortar,
Heating, Ventilation, The Roof, and many items
of interest to Builders._


The National Sheet Metal Roofing Co.
=Walter’s Patent Standard, and Cooper’s Patent Queen Anne
Metallic Shingles and Siding Plates,=

Press of W. J. Pell, 92 John Street, New York.



Architect, The, 4

Architects and Builders, 16

Brick-work, 34

Building.—Selecting a Site, 5

Buildings covered with Metal Shingles, 80

Buildings.—Old Materials, 42

Building.—Our Specialties, 95

Buildings, Sheet Metal Work for, 85

Building Paper, 47

Colors, 10, 48, 66

Chimneys, 17

Cellar, The, 22

Cistern, The, 46

Conductor or Leader Pipe, Cooper’s, 56

Construction, Inside, 83

Design for Cottages, 8, 12, 18, 24, 31, 38, 51, 58

Deadening and Fire-Proofing Floors, 60

Elbows, Cooper’s Curved, 76

Floors, Fire-Proofing, 60

Finials and How to Set Them, 73, 74

Foundation, The, 6

Guarantee, Our, 51

Gold Medal Award, 7

Heating, 44

Kitchen, The, 29

Metal Shingles, compared with Wood, 26

“ “ “ “ Slate, 36

“ “ “ “ Ordinary Tin Roofing, 37

“ “ Samples of, 30, 71

“ “ Queen Anne, 40

“ “ Directions for Laying, 61

“ “ How Made, 78

Measure, Surface, 41

Mortar? What is Good, 14

Roof Paint, 21, 39

“ Valleys or Gutters, 13, 23, 85

Roof, The, 28

“ Comparative Pitch of, 50

Roofing, Broad-Rib, 72

Ridge Coping, 54

Sheathing, The Best, 45

Testimonials, 87

Ventilation, 55, 73

What Our Goods Are, 20, 35, 68, 70, 77

Walter’s Patent and What It Is, 20



The object of this little book is to give to builders a few practical
hints that can be used in their endeavors to erect a home that is
proposed to be durable, comfortable and healthy. They are susceptible
of being improved to an extent that will meet the wishes of the most
extravagant builder, or simplified to suit purse and requirements of a
builder with moderate means.

We have left out generalities, and offer the reader solid facts that are
valuable to every one engaged in the ever pleasant task of constructing a

New York City.

Practical Hints to Builders.


Shall we employ one? Yes, if the work is sufficiently important to
justify it, and it is a very modest house indeed that is not.

As the professional architect is generally a graduate of one of the
building trades, and has gravitated to that position because of his
peculiar fitness for it, it stands to reason, some will think, that from
among the many builders one can be selected who is capable of taking the
contract and presiding as architect. To such persons we would say: You
are not familiar with the functions of an architect, when considered
separate from the builder. The architect can save you money. He discovers
your wants, your likes, and your dislikes; he reduces them to a tangible
form; he draws up the specifications so minutely that every variety of
material and labor is distinctly set forth as to its quality and kind.

When completed, plans and specifications are presented to a builder for
an estimate; he knows exactly what is expected of him. There is no chance
for controversy or quibble; all has been settled by the owner through
his architect. In consequence, if several contractors estimate upon the
building, it is known that their figures are all upon the same basis.

We will say in general he can save you from five to twenty per cent. in
cost; will give you better construction and proportions, and add a value
to your house, apart from its first cost, that if it does not sell for
more, it will sell more readily than if built without his service.


There are but few persons who are in a position to locate their proposed
home just where they would most desire it. But, fortunately, most any
building site is capable of being made to look well, it the style of
architecture selected harmonizes with the surroundings.

It is of the first importance that the location be a healthy one. Better
rent all your life than ignore that. Avoid the neighborhood of swamps and
stagnant water, or where the cellar, (if you have one) to your house,
from the nature of the location, will be damp. Large bodies of water,
or running water is never unhealthy; but on the contrary, it is in many
ways conducive to health. Some very uninviting, rugged and neglected
spots, can, with but little expense and an appropriate building, be made
exceedingly beautiful.

One of the prettiest school-houses I ever saw was built on a lot given
by a farmer for a district school. It did look as if the piece of ground
was worthless for any purpose; it was rocky, overgrown with briers and
bushes, and a tiny stream ran across the lot, jumping from rock to
rock, alongside of which, on a level spot but little larger than room
for a building, a house with steep roof and turret was built, and the
adjacent hillside made a splendid study and playground for the scholars.
When completed the building and grounds was a model of what a country
school-house should be.

While an elevation is at all times desirable, a hill is not. The exposure
to the storms in winter, and the tiresome walk in summer, is to be
avoided. A few native trees, if on the ground to furnish shade, are
desirable. The water supply, too, is to be considered. Most architects
say a Southern exposure is the best, but this depends on your location.
For Southern homes the East is preferable.



Just how deep to excavate to start the foundation of a house depends on
the climate and soil. Always dig trenches below the frost line in any
soil. This is sufficient if the subsoil is solid; if the subsoil is not
solid, go deep enough to reach solid earth.

In saying this, we are supposing you are not building in a swamp,
where it is often necessary to drive piles upon which to start a solid
foundation. Stone is generally used for foundation walls where it is
convenient, and it makes the best. Hard pressed brick, laid with mortar
composed of one part of hydraulic lime and two parts sharp sand, makes
a foundation not inferior to stone for all practical purposes. By using
the above mortar, dampness will not ascend from the ground to injure the
floor joists.

Mortar made from common lime or sand, though commonly used, is
objectionable for foundations, because dampness will ascend even above
the floor joists, if the floor is not several feet above the ground. It
is often the case that hydraulic lime cannot be conveniently had. In that
case a layer of slate or coarse paper, well saturated with pitch, laid
between the brick seams below the line of joists, will answer the same
purpose, and is less expensive.

See that the space between the joists is filled with brick, flush with
the under-side of floor boards. This prevents Mr. Rat, or other members
of his interesting family, from sitting in these little corners and
gnawing into the room above, or climbing between the siding to the
upper floors. If this little matter is attended to right, neither rats
or mice can enter the house, except through the doors. To keep them from
burrowing underneath the foundation walls, let the thickness of one brick
project outward at the bottom of the foundation. On burrowing downward,
a rat soon reaches this shelf, and following it around till he arrives
at the place he started from, becomes disgusted, or is supposed to, as
he is not seen about the house again. It is always better to have the
foundation broader at the bottom than the thickness of wall intended to
be used. This is necessary in all brick houses, unless on a rock bottom.

See that the space under the ground floor is left clear of rubbish
before the floor is laid, and grating built in the wall for ventilation.
This opening can be closed in winter to secure additional warmth. The
cellar is closely related to the foundation; we give some hints on its
construction on page 22.

* * * * *

[Illustration: Fac-simile of Gold Medal awarded to WALTER’S PATENT
METALLIC SHINGLES. These shingles have received twenty-eight other awards
for merit in the United States.]

* * * * *

The plans and elevations of cottages presented in this book have each
been specially prepared for some individual by an eminent architect, and
the proportions and details can be relied upon.

[Illustration: _Design_ I.—_Front Elevation_.


Estimated Cost, with Bath and Furnace, $5,000 to $6,000.

Roof to be covered with 10 × 14 Galvanized Tin Shingles; porches with
same; tower with 7 × 10, same quality; use attic vents on main roof, and
No. 1 Six-foot Finial on apex of tower.]

[Illustration: _First Floor._

_Second Floor._

_Design_ I.—(_Elevation, page 8._)]

COLORS.—For Exterior and Interior.

As your house nears completion, it is well to decide upon colors. That
is a distinctive feature which is to give tone and beauty, and make
your house in some respects different from all others. The question of
painting is often a mere matter of preserving the structure, and not a
question of beauty or harmony of colors, or what would be best suited
to the surroundings; it is too often the case that but little regard is
paid to those nice perceptions that make one man’s work many times more
valuable than another. Strong contrasts of color should be avoided. Light
tints are preferable to strong colors. Think of a house painted black,
red, yellow, or green.

Let the surroundings suggest what the exterior colors should be. A house
surrounded by trees and shrubbery will admit of white, with white tinted
trimmings, such as cornices, corner-boards, window and door frames; but
for half the year the green foliage of the trees is turned to brown,
which but partially relieves the glaring white. This is why that color
is not a favorite for exteriors. As a rule, select a light color for the
body of the house, and darken that for the trimmings.

For interior wood-work select light wood colors; let none be darker
than walnut. Oak, chestnut, ash, white walnut, maple and cherry make
a beautiful finish by simply oiling, and varnishing if a gloss is
preferred. Very light shades of ochre make beautiful ceilings which
can be ornamented with suitable designs, using darker but delicate
shades of other light colors. Here is where the taste and skill of the
painter comes in, and unless you are an adept, don’t fail to consult an
experienced decorator for your inside walls.

For houses of moderate cost we think nothing is equal to solid colors
for inside walls. Let the colors be light and cheerful, and the rooms of
different shades. (See page 48).

* * * * *


If you are interested in _Roofing_, send for our Price List and Discount
Sheet, which is special to the trade. We are pioneers in the introduction
of practical metal shingles, and no imitator has yet produced their
equal. Our goods are largely used throughout the United States and
Canadas; are used by the Government and Railroads; approved by the Fire
Insurance Companies, and many leading Architects and Builders. They are
lighter than slate, and will last longer without repairs; and the low
rate of insurance on our roofing will, in a short time, more than balance
the difference in price where wood shingles are cheaper.

As seen by the cut, our shingles are the same to-day as when first
introduced. Remember, no cleats or springs are necessary in using our
shingles. The lock is simple and perfect, with corrugations across the
top, and bracing corrugations across the exposed end of the shingles,
which stiffen and hold the shingles firmly to the underlying courses.
They are easily applied, and any one who can lay a wood shingle can lay
these. We furnish them in four sizes, made from charcoal roofing tin,
painted both sides and unpainted, galvanized tin plate, which is superior
to galvanized iron, cold rolled copper, and steel plates. We keep on hand
a full line of roofing sundries.

[Illustration: Fac-simile of beginning of first two courses.]

Our Shingles received the highest and only award for metal shingles at
the American Institute, held in this city, October, 1886, and New Orleans
Exposition, 1885.


_RICHARD KNISELY & SON, 184 South Jefferson St., Chicago, Ills._

_W. W. MONTAGUE & CO., San Francisco, Cal., Pacific Coast._

_J. J. WALTERS, Denver, Col._

_PHILLIPS & BUTTORFF MFG. Co., Nashville, Tenn._


_MACHWIRTH BROS., Buffalo, N.Y._

_JEROME TWICHELL & CO., Kansas City, Mo._

_F. H. LAWSON & CO., Cincinnati, Ohio._

The National Sheet Metal Roofing Company, 510, 512, 514, 516, 518, 520


* * * * *

[Illustration: _Design_ C.—_Front and Side Elevation._


Estimated Cost, with Bath and Furnace, $1,800 to $2,000.]


It is generally known to builders and roofers that the greatest amount
of wear upon all kinds of roofs is in the valleys or gutters. Therefore,
that part of the roof, whether covered with slate, tin or wood shingles,
should be of the best material, and free from the annoying possibility of

This trouble is always caused by expansion and contraction of the metal.
The usual method is to make the valley of the desired length, and, after
shaping to the roof-boards, to nail each side firmly. The result is,
with the summer heat, a buckle is often formed at some point between
the two ends. In cold weather the buckle draws out, and in course of
time, if the joints in the middle do not give way, a leak will appear,
caused by the metal cracking. This will not occur with our roof valleys,
because we amply provide for the expansion and contraction of the same.
We particularly call the attention of dealers in building material to
our Queen Anne Valley. It is salable, durable and cheap, always ready to
apply; can be used by any workman capable of laying slate, tin or wood
shingles. (See page 23).


* * * * *

[Illustration: _First Floor._

_Second Floor._

_Design_ C.—(_Elevations, page 12._)]



To a casual observer mortar is mud, but to a builder who understands the
chemistry of mortar it is a compound of water, lime and sand, and when
properly prepared forms an indestructible cement. Fresh slacked lime,
when brought in contact with clean, sharp sand, adheres strongly to the
surface of each grain, and forms the silicate of lime.

At the same time the drying mortar absorbs carbonic acid from the
atmosphere, forming with it lime-stone, which in time becomes a rock in
solidity. Now, all mortar is good or bad in proportion to the purity of
the ingredients and their relative affinity for each other. The adhesive
properties of mortar are nullified by loam or clay in sand, or the stale
condition of lime used.

Loam mortar adheres freely to the surface of walls or ceilings. So does
mud if thrown against an upright surface; but water dissolves it. It
dries quickly, but does not harden with age. The foundation of many
frame, and the entire walls of many brick houses are built with poor
mortar, when the materials for good could be had at the same price.

Water, lime, sand and hair are the ingredients for plasterers’ mortar
in about the following proportions: One bushel unslacked lime and four
bushels sharp sand; (to this add twenty-four pounds of dry hair for every
one hundred yards, when used for “scratch” or first coat,) and water
sufficient to make it of proper consistency. After being properly mixed,
the mortar should stand from three to ten days before using. However,
the time it should stand depends upon the susceptibility of the lime to
slack. Some lime requires a month, while good lime slacks immediately.
Age improves mortar, provided it is kept wet, and makes it work easier
under the workman’s trowel. As it is the keys formed by pressing the
mortar against the lathing on the ceiling that holds it to its place,
there should be a relative width of lath and key space to insure strength
sufficient to prevent its falling. Ignorance of this, and poor mortar,
is the cause of falling ceilings. Lath one inch wide, 7/16 inches thick,
placed 7/16 inches apart will insure good strong work.

The second coat needs but a very small quantity of hair. Fifty bushels
sand, and twelve and one-half bushels unslacked lime, will make mortar
enough to cover one hundred square yards. If mortar freezes before it is
dry it loses its cementing properties and becomes in common phase rotten,
but if the sand used is clean, and it remains frozen without thawing
until it is dry, it is not injured. The best way to treat a house in
which the plastering is not dry, and cannot be kept from freezing before
it dries, is to throw the house open, and let it freeze for eight or ten
days, or until the plastering freezes dry.

Cisterns should be plastered inside with mortar made of equal parts of
hydraulic lime and clean sand. For brick work above foundations use one
part unslacked lime to four parts sand.

* * * * *

“THE INDEPENDENT,” 251 BROADWAY, NEW YORK, October 28th, 1889.

Gentlemen:—The shingles from your respected concern used on my
new house look splendidly, and give entire satisfaction. They
are far better than any metal shingles I have previously used
on other buildings, which I have had torn off and thrown away
as worthless. At times we were flooded by the water under their
(want of) protection, and we could not stop the leaks. Noah in
the ark I am sure was, fortunately, not troubled with leaks
such as we endured for years; if he had been all would have
been drowned. Now, under your protection, we are all right and
still alive.




There is no detail of house building more important than the roof. Upon
it depends to a great degree the durability and preservation of the
whole structure. The number of good houses with mottled ceilings and
cracked plastering, to be seen all over the country, are reminders of the
necessity of securing the best material and faultless construction for
this important part of your dwelling.

The advantages we claim for our Tin Shingle, over the ordinary mode of
applying sheet metal for roofing purposes, consists in its =Superior
Strength, Freedom from Wrinkles and Cracking=, (which cannot at all
times be prevented where sheet metal is put on in continuous sheets);
and in being the =Most Ornamental and Durable= of all sheet metal roof
coverings. Now, in answer to this last assertion you may say, How can
this be? Is not the same quality of tin as durable when applied in one
form as another? We answer, By no means. The writer—and we presume the
reader—has seen tin roofs worked, and walked over in the necessary
finishing up, to such an extent as to seriously damage the roof. The Tin
Roofers’ mallets, seamers, tongs, and sliding over the roof, do more real
damage to the surface of tin plate than several years’ wear. We entirely
overcome this difficulty, as no part of the exposed surface of our Tin
Shingles are struck with a mallet or hammer in applying them. Again,
where metal plates are put together in continuous sheets, moisture,
which condenses underneath for want of ventilation, settles in the
cross-seams and causes decay, and the ordinary metal roof when removed
invariably shows this to be the case, while the other part of the plate
shows no perceptible wear. Our form of metal roofing has no cross-seams,
and has sufficient ventilation to prevent the condensation of moisture
underneath, making it by many years the most durable form of metal
roofing ever offered to the American people.

Our object is to furnish the building public with a better form of
roofing material, attractive in appearance, without the objections of the
heavy slate, the clumsy shingle, or the plain ribbed metal roof; and at a
price that claims the attention of Architects and Builders of the whole

New York City.



We will not moralize on the evils of smoky chimneys, but just tell you
in plain language how to construct them so they will not smoke. Make
the throat of the fire-place not more than half the size of the flue;
carefully smooth the inside of the flue, and have it of the same area
all the way to near the top of the chimney, when it should be gradually
tapered inward to about half the area of the flue. At the extreme top,
the cap stone should slant from the opening in all directions downward
at an angle of about twenty degrees. This will insure a good draught and
prevent the smoke blowing downward. No two fire-places should enter the
same flue; neither should a stove-pipe enter a flue unless the fire-place
is closed. Each stove and fire-place should have its own flue. The size
necessary for a flue depends on the fuel to be used.

Soft or Bituminous coal requires a flue nearly double the size of one
where Anthracite is to be used; an open fire-place for wood, larger flues
than either. For instance, an 8 × 8 inch flue answers for Anthracite,
because it makes but little soot, while if Bituminous coal is used, 8 ×
12 is none too large.

You will find in houses all over the country flues smaller than the
above, and a corresponding number of smoky chimneys, which it is
impossible to remedy without re-building from the bottom up.

The carelessness displayed in chimney construction is astonishing. As
the work is hid from view on completion, be watchful during the process
of construction from the ground up. All chimneys should, if possible,
extend above the apex or comb of roof, and should be built of good hard
burnt brick, and no woodwork should be allowed to enter within five
inches of inside of flue, and not within twelve inches anywhere near the

* * * * *

[Illustration: _Design_ H.—_Front Elevation._


Estimated Cost, with Bath and Furnace, $3,500 to $4,000.

Roof covered with 10 × 14 No. 1 Standard Tin Shingles; gables with Queen
Anne; second story, sides, with 7 × 10 Standard Tin Shingles; and porches
with Broad Rib Tin Roofing; use No. 2 Five-foot Finial on tower.]

[Illustration: _First Floor._ _Second Floor._

_Design_ H.—(_Elevation, page 18._)]

* * * * *

A retired plumber thus gives a point for the gratuitous relief of
householders: “Just before retiring at night pour into the clogged pipe
enough liquid soda lye to fill the ‘trap’ or bent part of the pipe. Be
sure that no water runs in it until the next morning. During the night
the lye will convert all the offal into soft soap, and the first current
of water in the morning will wash it away and clear the pipe clean as


Previous to the granting of a patent to John Walter, in 1882, there were
no tin shingles manufactured for the trade in the United States, with the
exception of those which covered more than two-thirds of their surface
to get one-third exposed to the weather; the same is commonly done with
wood shingles. This made them too expensive for general use. The Walter’s
patent made it practical to expose five-sixths of the surface and only
conceal one-sixth of the shingle. This great saving at once reduced the
cost of metal shingles over one-half, and enabled the National Sheet
Metal Roofing Co., which controls this patent, to put on the market the
best metal roofing in the world, at prices that compete with ordinary
wood shingles. (See “Comparative Cost,” pages 26 and 27.)

How this was done is best expressed in the claim granted the patentee,
copied from the United States Official Gazette:

“A metal roofing plate having a gutter formed by corrugations
at one side, and a perforated flange at the side of the gutter,
whereby it shall be nailed to the roof of a house; a broad
corrugation at the other side adapted to form a seam with the
adjoining edge of a corresponding plate, substantially as shown
and described.”


The advantage of this lock is that it makes a water-tight seam without
soldering or hammering down. The plates are joined as easy as crossing
two sticks, with ample provision for expansion and contraction. This lock
is the perfection of simplicity; there is no exposed seam where water is
liable to lodge and cause rust; no cleats are used, and no tin springs
are necessary to hold the side edges of connecting plates to prevent
water seeping through.


The subject of painting sheet-metal roofs is one of great importance,
says the _Builder, Decorator and Wood-Worker_, not only on account of the
protection afforded, but because the material, when properly colored, can
be made pleasant to the eye when placed in exposed positions. While many
kinds of paint have been discovered and patented, composed of a great
variety of materials, it is a question if there is a substance used that
is an effective substitute for linseed oil, regarding the effectiveness
of which an authority on the subject says: “By consulting experienced
and unbiased painters you will learn the fact that there is no vehicle
pigments at all approaching linseed oil in effectiveness and durability,
especially for exposure to the weather. A good paint must be both hard
and elastic. It requires hardness to prevent abrasion and wear, and
elasticity to prevent cracking from expansion and contraction. Nothing
but linseed oil will give these qualities, for, strange as it may seem to
many in these days of novelties, the pigments really add but very little
to the effectiveness of paints. Mark, we say the best of pigments, for
many pigments are the reverse of protective, and are really destructive
to both the vehicles and the material which they are supposed to protect.
For example, coal tar and all its products, whether called dead oil,
asphalt, rubber, etc., are of the class just described, and their use at
any price, especially for covering sheet-metals, is a wanton waste of
money. Extended experiments have demonstrated that there is no better
pigment for metal than a good iron ore ground to an impalpable powder. To
be most thoroughly effective the pigment must be intimately incorporated
with the vehicle, which can best be done only by grinding them together
in a stone mill by steam power.” It is of the greatest importance that
sheet-metal roofs, especially those made of iron, should be protected
from the action of the elements, as when so protected there is hardly
any limit to the time they will last. In order that the paint should be
effective, it should be applied before the iron has had an opportunity
to rust, and the first coat should be of the best quality and applied
in the best manner; or if it is defective it is plain that it will not
only require repainting far sooner than it should, but no matter how
good the subsequent coatings of paint are, they cannot be effective if
founded on an original coating which has commenced to crack or peel, as
it certainly will if not prepared with the best methods and materials.
Another important point to be observed in the painting of sheet-metal is
that the paint should not be too thick, as it is the linseed oil that is
to be depended on to furnish protection, and as the action of the air on
the surface of the exposed oil gives it a particularly hard surface, two
thin coats of paint are much more durable than one thick one.

Remember, it is the =rust-preventing= qualities of linseed oil, combined
with the oxide of iron, that makes steel or iron sheets resist the
corrosive action of oxygen, which is ever present in the atmosphere. (See
page 101.)


The cellar under a dwelling house has many advocates. It is a convenient,
cool place, and nineteen times out of twenty is a damp, dark, musty,
foul-smelling place. It cannot well be otherwise and be a cellar. It is a
store-room for all sorts of vegetables; odds and ends of most everything
are laid away in that dark retreat. It is the favorite resort of spiders,
toads and other creeping things; it is the unrelenting enemy (?) of the
family physician, the breeding-place of malaria, which unceasingly sends
its poisonous vapors into every part of the dwelling above it. It would
be suicide for one to make it their sleeping room.

But if you insist upon having a cellar under your house, and will not
put it under the corn-crib or carriage-house, see that it is properly
constructed. This is more important than most of the other parts of the
house, for upon it in a great measure depends the health of your entire

The floor of the cellar should be hard and dry, with no woodwork in
its construction. To obtain this result, cover the floor about three
inches deep with coarse gravel, or broken stone, well pounded to a level
surface. Fill this with a thin mortar, composed of one part hydraulic
cement and two parts sharp sand, smoothing it off with a trowel or
plasterer’s level. When we mention sharp sand, we mean coarse, clean sand.

Build a flue, say 8 × 12 inches (with an opening next to the floor of the
cellar fully that size), from the bottom of cellar foundation alongside
of and extending to top of kitchen chimney, the heat of which will create
a constant, upward current of air from the cellar. On the opposite side
of cellar from this ventilating flue make an air inlet near the ceiling
for the purpose of supplying fresh air to the cellar. This will keep
the cellar dry and the atmosphere healthy. Put a wire netting over the
opening to prevent the entrance of rats and mice. If from the nature of
the location, or other causes, a cellar is damp, dig a trench all around
a little below and outside of the foundation wall; this trench should be
covered with flat stones and earth filled in a little above the surface
line, so that surface water will flow from, and not settle next to, the
foundation walls. When the cellar is completed whitewash the walls and

Я не могу подсчитать слова(должно вывести количество слов "the"), у меня просто ничего не выводится, помогите пофиксить.
Последнее редактирование:


Результат: 448 - твой метод
Используя твой метод:
def main(filename, search_word):
        with open(filename, "r", encoding="utf-8") as list_a:
            mn = list_a.read()
        print(f"Результат: {mn.lower().count(search_word.lower())}")
    except FileNotFoundError as Ex:

if __name__ == "__main__":
    main(filename="cat.txt", search_word="the")
Результат: 378 - строгий поиск The в тексте
Строгий поиск the с помощью регулярного выражения:
import re

def main(filename, search_word):
        with open(filename, "r", encoding="utf-8") as list_a:
            mn = list_a.read()
        match = re.findall(fr"\b{search_word.lower()}\b", mn.lower())
        print(f"Результат: {match.count(search_word.lower())}" if match else f"Not Found: {search_word}")
    except FileNotFoundError as Ex:

if __name__ == "__main__":
    main(filename="cat.txt", search_word="the")
Результат: 448 - все вхождения the в тексте, как и в первом варианте(твоем)
НЕ строгий поиск the как в первом варианте, но регуляркой:
import re

def main(filename, search_word):
        with open(filename, "r", encoding="utf-8") as list_a:
            mn = list_a.read()
        match = re.findall(fr"{search_word.lower()}", mn.lower())
        print(f"Результат: {match.count(search_word.lower())}" if match else f"Not Found: {search_word}")
    except FileNotFoundError as Ex:

if __name__ == "__main__":
    main(filename="cat.txt", search_word="the")