subject

Write a function named lineStats. The function lineStats takes three parameters: 1.inFile, a string that is the name of an input file 2.outFile, a string that is the name of an output file 3.threshold, an int that is the length above which a word is considered significant The function lineStats should read and analyze each line of the input file and write two statistics, separated by a space, about the line to a corresponding line of the output file. The two statistics for each line are: 1.the number of words 2.the number of distinct significant words (that is, words longer than threshold) Hint: if a word occurs more than once on a line it counts as a single word. Upper and lower case characters are considered the same ('Word' and 'word' are the same word). The input file contains only upper and lower case letters and white space. For example, if the file fish. txt contains the following lines: Yes some are red and some are blueSome are old and some are newThen the function call: lineStats('fish. txt', 'fishOut. txt', 3)should produce an output file fishOut. txt with the following content: 8 27 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
What result from the passage of this amendment
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Where would you click to edit the chart data?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
You know the right answer?
Write a function named lineStats. The function lineStats takes three parameters: 1.inFile, a string...
Questions
question
Mathematics, 06.02.2022 01:40
question
Mathematics, 06.02.2022 01:40
question
Mathematics, 06.02.2022 01:50
question
Mathematics, 06.02.2022 01:50
Questions on the website: 13722367