Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function that takes as input the file thehoundofthebaskervilles.txt and returns how many times names Holmes and Watson have been mentioned in the same

Write a function that takes as input the file "thehoundofthebaskervilles.txt" and returns how many times names Holmes and Watson have been mentioned in the same sentence. using python. The below paragraph is in the file.. can you put it in the file and show how to code them. 

Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table. I stood upon the hearth-rug and picked up the stick which our visitor had left behind him the night before. It was a fine, thick piece of wood, bulbous-headed, of the sort which is known as a Penang lawyer. Just under the head was a broad silver band nearly an inch across. To James Mortimer, M.R.C.S., from his friends of the C.C.H., was engraved upon it, with the date 1884. It was just such a stick as the old-fashioned family practitioner used to carry--dignified, solid, and reassuring.

Well, Watson, what do you make of it?

Holmes was sitting with his back to me, and I had given him no sign of my occupation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

what are raster and vector GIS models ?

Answered: 1 week ago