Question: Python 3.6 Question 12 (20 points) Write a function named lineStats. The function lineStats takes two string parameters: the name of an input file and

Python 3.6

Python 3.6 Question 12 (20 points) Write a function named lineStats. The

Question 12 (20 points) Write a function named lineStats. The function lineStats takes two string parameters: the name of an input file and the name of an output file. The function lineStats should read and analyze each line of the input file and write two statistics about the line to a corresponding line of the output file. The statistics to compile for each line are 1) the number of unique words 2) the number of unique characters (including the space character but not including the endline character) Upper and lower case characters are the same (A' and 'at are the same word, for example). The input file contains only upper and lower case letters and white space If the input file contains the following lines: Step right up step right up step right up Everyone a winner bargains galore Then an output file with the following lines would be correct: words 3 chars 11 words 5 chars 15

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!