The following table that is available in a file “rain.txt" shows the amount of rain in mm³ that fell in Rembau, Negeri Sembilan for the year of 2020. Write a program that does the following tasks: 1. reads these data and write the data in a file "out.txt". 2. determines the highest amount of rain along with the month it occurs and write the results in the file "out.txt". 3. sort in ascending order the monthly amounts of rain and write the results in the file "out.txt".

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In pseudocode 

The following table that is available in a file “rain.txt" shows the amount of rain in mm³ that fell
in Rembau, Negeri Sembilan for the year of 2020. Write a program that does the following tasks:
1. reads these data and write the data in a file “out.txt".
2. determines the highest amount of rain along with the month it occurs and write the results
in the file "out.txt".
3. sort in ascending order the monthly amounts of rain and write the results in the file
"out.txt".
Input data in rain.txt
-3-
January
4.2597
February
3.5983
March
2.2356
Аpril
1.2743
Mei
1.5433
June
0.1346
July
0.2658
August
0.6923
September
1.2496
October
2.5557
November
4.5983
December
5.2376
Sample output in out.txt
MONTHLY RAIN
Location: Rembau, Negeri Sembilan
Year: 2020
January
4.2597
February
3.5983
March
2.2356
April
1.2743
Mei
1.5433
June
0.1346
July
0.2658
August
0.6923
September
1.2496
October
2.5557
Transcribed Image Text:The following table that is available in a file “rain.txt" shows the amount of rain in mm³ that fell in Rembau, Negeri Sembilan for the year of 2020. Write a program that does the following tasks: 1. reads these data and write the data in a file “out.txt". 2. determines the highest amount of rain along with the month it occurs and write the results in the file "out.txt". 3. sort in ascending order the monthly amounts of rain and write the results in the file "out.txt". Input data in rain.txt -3- January 4.2597 February 3.5983 March 2.2356 Аpril 1.2743 Mei 1.5433 June 0.1346 July 0.2658 August 0.6923 September 1.2496 October 2.5557 November 4.5983 December 5.2376 Sample output in out.txt MONTHLY RAIN Location: Rembau, Negeri Sembilan Year: 2020 January 4.2597 February 3.5983 March 2.2356 April 1.2743 Mei 1.5433 June 0.1346 July 0.2658 August 0.6923 September 1.2496 October 2.5557
November
4.5983
December
5.2376
The highest rain is 5.2376 mm2 in December.
Rains in ascending order:
June
0.1346
July
0.2658
August
0.6923
September
1.2496
April
1.2743
Mei
1.5433
March
2.2356
October
2.5557
February
3.5983
January
4.2597
November
4.5983
December
5.2376
Transcribed Image Text:November 4.5983 December 5.2376 The highest rain is 5.2376 mm2 in December. Rains in ascending order: June 0.1346 July 0.2658 August 0.6923 September 1.2496 April 1.2743 Mei 1.5433 March 2.2356 October 2.5557 February 3.5983 January 4.2597 November 4.5983 December 5.2376
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Storage Devices
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education