Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 12 (20 points) Write a function named wordLineCount with the following input and output: Input: rin parameter, inFile, that is the name of a

image text in transcribed

Question 12 (20 points) Write a function named wordLineCount with the following input and output: Input: rin parameter, inFile, that is the name of a file Output return a dictionary in which each unique word in inFile is a key and the corresponding a str value is the number of lines on which that word occurs The file inFile contains only lower case letters and white space. For example, if the file ben.txt contains these lines tell me and i forget teach me and i remember involve me and i learn then the following would be correct output: >>> print (wordLineCount ('ben.txt') 'remember': 1, 'and 3, 'tell': 1, 'me': 3, 'forget': 1, 'learn': 1, 'involve': 1, 'i': 3, 'teach 1)

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions