Write a function named repeatcount the function repeatcount


Write a function named repeatCount(). The function repeatCount() takes two string parameters: the name of an input file and the name of an output file. The function repeatCount() should read each line of the input file, identify the number of words on the line that occur more than once, and write that number to a line in the output file. A word should be considered to be repeated if occurs with different capitalization. That is, 'To' and 'to' are the same word. You may assume that the file contains only upper and lower case letters and white space; it does not contain any punctuation marks. 

For example, suppose the input file contains the following four lines: 

Woke up this morning with an ache in my head I splashed on my clothes as I spilled out of bed I opened the window to listen to the news
But all I heard was the Establishment Blues 

Then the output file should contain the following four lines: 

0

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a function named repeatcount the function repeatcount
Reference No:- TGS02512017

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)