Text processing/1: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Add mirror of data file. (Link is 404)) |
(→{{header|Kotlin}}: Re-ran program following recovery and mirroring of full data file.) |
||
Line 2,201: | Line 2,201: | ||
=={{header|Kotlin}}== |
=={{header|Kotlin}}== |
||
⚫ | |||
As the link to the full data file is now broken, I've had to confine myself to the 6 lines shown in the task description for testing purposes. |
|||
⚫ | |||
import java.io.File |
import java.io.File |
||
Line 2,255: | Line 2,254: | ||
{{out}} |
{{out}} |
||
Abbreviated output: |
|||
<pre> |
<pre> |
||
Line: |
Line: 1990-01-01 Reject: 2 Accept: 22 Line_tot: 590.000 Line_avg: 26.818 |
||
Line: |
Line: 1990-01-02 Reject: 0 Accept: 24 Line_tot: 410.000 Line_avg: 17.083 |
||
Line: |
Line: 1990-01-03 Reject: 0 Accept: 24 Line_tot: 1415.000 Line_avg: 58.958 |
||
Line: |
Line: 1990-01-04 Reject: 0 Accept: 24 Line_tot: 1800.000 Line_avg: 75.000 |
||
Line: |
Line: 1990-01-05 Reject: 0 Accept: 24 Line_tot: 1130.000 Line_avg: 47.083 |
||
.... |
|||
Line: |
Line: 2004-12-27 Reject: 1 Accept: 23 Line_tot: 57.100 Line_avg: 2.483 |
||
Line: 2004-12-28 Reject: 1 Accept: 23 Line_tot: 77.800 Line_avg: 3.383 |
|||
Line: 2004-12-29 Reject: 1 Accept: 23 Line_tot: 56.300 Line_avg: 2.448 |
|||
Line: 2004-12-30 Reject: 1 Accept: 23 Line_tot: 65.300 Line_avg: 2.839 |
|||
Line: 2004-12-31 Reject: 1 Accept: 23 Line_tot: 47.300 Line_avg: 2.057 |
|||
File = readings.txt |
File = readings.txt |
||
Total = |
Total = 1358393.400 |
||
Readings = |
Readings = 129403 |
||
Average = |
Average = 10.497 |
||
Maximum run of |
Maximum run of 589 consecutive false readings |
||
ends at line starting with date: |
ends at line starting with date: 1993-03-05 |
||
</pre> |
</pre> |
||