Math, asked by ak9905817278, 4 months ago

Define a function Count_Word(W) in Python, where the parameter W is a word (string). The function should read each word of a text file STORY.TXT and count the occurrences of the word W in the text file STORY.TXT (non-case-sensitive search and count). The function is also expected to return the total number of occurrence of the word W in the text file.

For example, if the file content is as follows:
I live in New Delhi
New Delhi is the national capital of India
.
The Count_Word(‘Delhi’) function should return 2





30thanks
533 { \frac{ \frac{ \frac{ { {4 {5 { { \frac{ | ln( ln( \cot( \cos( \cot( \tan( \alpha ) ) ) ) ) ) | }{?} }^{?} }^{2} }^{?} }^{2} }^{2} }{?} }{?} }{?} }^{2}

Answers

Answered by Anonymous
2

Answer:

For example, if the file content is as follows:

I live in New Delhi

New Delhi is the national capital of India

.

Answered by Aloneboi26
0

Answer:

Define a function Count_Word(W) in Python, where the parameter W is a word (string). The function should read each word of a text file STORY.TXT and count the occurrences of the word W in the text file STORY.TXT (non-case-sensitive search and count). The function is also expected to return the total number of occurrence of the word W in the text file.

Similar questions