0 votes
21 views
in Computer by (50 points)
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 (noncase-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

Please log in or register to answer this question.

Related questions

0 votes
0 answers
asked Jan 13 in Computer by Makalo Mikal (50 points)
0 votes
0 answers
asked Jan 13 in Computer by Makalo Mikal (50 points)
0 votes
0 answers
0 votes
0 answers
asked Jan 13 in Computer by Makalo Mikal (50 points)
0 votes
0 answers
asked Jan 13 in Computer by Makalo Mikal (50 points)

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...