Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please follow the instructions attached : consider the input sample below 3 11 12 05 1 8.7 3 11 11 56 143 8.6 3 11

Please follow the instructions attached :
image text in transcribed
consider the input sample below 3 11 12 05 1 8.7 3 11 11 56 143 8.6 3 11 13 01 163 8.9 3 10 18 05 1 7.3 3 10 19 01 17.3 2 28 01 022-1.0 2 28 09 07 2-0.5 6 10 17 00 111 18.7 The data contains records for 5 station IDs (1, 2, 111, 143 and 163). Some stations only have one reported observation and some have several. Notice that there are observations present for 4 different days (March 11th, March 10th, Feb. 28th and June 10th) Your task for part 1 is to write a program which reads an input file containing any number of observations and generates an output file called daily minimum_maximum_summary.txt containing the minimum temperature and the maximum temperature for each month/day in the input file. The output will be a text file with one line for each month/day in the input file. Each line will have the format "month day min temperature max temperature", where min temperature and max-temperature are printed with two decimal places (using the %2 specifier). The output must be printed ordered by month and day. Days for which no observations wre recorded must be omitted from the output. For example, on the input sample above, the output would be 2 28-1.00-0.50 310 7.30 7.30 3 11 8.60 8.90- 6 10 18.70 18.70 Notice that in cases where a particular day (such as June 10th) has only one valid observation, that obscrvation is both the minimum and maximum temperature for that day. consider the input sample below 3 11 12 05 1 8.7 3 11 11 56 143 8.6 3 11 13 01 163 8.9 3 10 18 05 1 7.3 3 10 19 01 17.3 2 28 01 022-1.0 2 28 09 07 2-0.5 6 10 17 00 111 18.7 The data contains records for 5 station IDs (1, 2, 111, 143 and 163). Some stations only have one reported observation and some have several. Notice that there are observations present for 4 different days (March 11th, March 10th, Feb. 28th and June 10th) Your task for part 1 is to write a program which reads an input file containing any number of observations and generates an output file called daily minimum_maximum_summary.txt containing the minimum temperature and the maximum temperature for each month/day in the input file. The output will be a text file with one line for each month/day in the input file. Each line will have the format "month day min temperature max temperature", where min temperature and max-temperature are printed with two decimal places (using the %2 specifier). The output must be printed ordered by month and day. Days for which no observations wre recorded must be omitted from the output. For example, on the input sample above, the output would be 2 28-1.00-0.50 310 7.30 7.30 3 11 8.60 8.90- 6 10 18.70 18.70 Notice that in cases where a particular day (such as June 10th) has only one valid observation, that obscrvation is both the minimum and maximum temperature for that day

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+17.3. Extend Theorem 17.1 to R *.

Answered: 1 week ago