Question: Problem 3. Write a function named repeat words that takes two string paramelers 1. the name of an input Tie that exists before repeat words

 Problem 3. Write a function named repeat words that takes two

Problem 3. Write a function named repeat words that takes two string paramelers 1. the name of an input Tie that exists before repeat words is called 2. the name of an output file that repeat words creates Assume that the input file is in the current working directory and wirite the output file to that directory shouid be lower cased and stripped of leading and trailing punctuation. Each repeated word on a line output file only once, regardless of the number of times the word is repeated Each repeated word on a line should be witten to the com For example, it the following is the content of the file catin TheHat Too wet to go out and too cold to play ba So we sat in the nouse We did nothing at all So all we could do was to Sit! Sit! St Sitr The following function call. repeatwords(inF, outF) should create the file catRepWords txt with the content. too to sit Hint Be sure to test your souton with input in which some repeated words on a line are a msxture of upper and lower case, and in which repeated words or by pu nctuation sometimes are el@llb

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!