The file FlowData.txt contains volumetric flow rate in cubic meter per hour (m³/h) in the following format: 01/04/2021 10:15:46 50.6221 01/04/2021 10:15:47 50.6098 01/04/2021 10:15:48 50.5353 01/04/2021 10:15:49 50.5856 First column is Date, second is Time, and the third represents flow rate in m'lh. Write a program that: 1. Reads this data 2. Converts flow rate (F) in mlh to liters per second. 1 m^3 = 1000 liters and 1 hour = 3600 seconds. 3. Computes F/(F - 50.285) , where F is given in m^3/h. 4. Writes the following on the output file: FlowProcessed.txt : Date Time (F) m^3/h (F) liters/s X = F/(F-50) 01/04/2021 10:15:46 Value 1 Value 2 Value 3 5. Handles the following errors by showing appropriate message to the user: File not found. • Division by zero • Data Type error 6. Closes both files at the end of the program even if an exception is raised.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Please solve this simple python problem. All details are shown in the attached image. 

And the data below are what the "FlowData.txt" file contains.(showing on the second image)

01/04/2021 10:15:46 50.6221 01/04/2021 10:15:47 50.6098 01/04/2021 10:15:48 50.5353 01/04/2021 10:15:49 50.5856 01/04/2021 10:15:50 50.5913 01/04/2021 10:15:51 50.6181 01/04/2021 10:15:52 50.4927 01/04/2021 10:15:53 50.3314 01/04/2021 10:15:54 50.3442 01/04/2021 10:15:55 50.3016 01/04/2021 10:15:56 50.2253 01/04/2021 10:15:57 50.2431 01/04/2021 10:15:58 50.285 01/04/2021 10:15:59 50.3179 01/04/2021 10:16:00 50.3218 01/04/2021 10:16:01 50.3972 01/04/2021 10:16:02 50.3883 01/04/2021 10:16:03 50.3942 01/04/2021 10:16:04 50.5254 01/04/2021 10:16:05 50.6013 01/04/2021 10:16:06 50.6389 01/04/2021 10:16:07 50.4611 01/04/2021 10:16:08 50.4842 01/04/2021 10:16:09 50.6168 01/04/2021 10:16:10 50.8298 01/04/2021 10:16:11 50.8362 01/04/2021 10:16:12 50.9185 01/04/2021 10:16:13 50.8174 01/04/2021 10:16:14 50.8498 01/04/2021 10:16:15 50.7928 01/04/2021 10:16:16 50.7903 01/04/2021 10:16:17 50.8563 01/04/2021 10:16:18 50.8106 01/04/2021 10:16:19 50.7581 01/04/2021 10:16:20 50.6735 01/04/2021 10:16:21 50.7084 01/04/2021 10:16:22 50.5939 01/04/2021 10:16:23 50.5104 01/04/2021 10:16:24 50.5083 01/04/2021 10:16:25 50.3265 01/04/2021 10:16:26 50.3158 01/04/2021 10:16:27 50.2088 01/04/2021 10:16:28 50.0092 01/04/2021 10:16:29 50.0737 01/04/2021 10:16:30 50.0289 01/04/2021 10:16:31 50.1272 01/04/2021 10:16:32 50.2268 01/04/2021 10:16:33 50.1349 01/04/2021 10:16:34 50.0975 01/04/2021 10:16:35 50.1781 01/04/2021 10:16:36 50.2063 01/04/2021 10:16:37 49.9844 01/04/2021 10:16:38 50.0034 01/04/2021 10:16:39 50.1461 01/04/2021 10:16:40 50.2062 01/04/2021 10:16:41 50.277 01/04/2021 10:16:42 50.0156 01/04/2021 10:16:43 50.1345 01/04/2021 10:16:44 50.2592 01/04/2021 10:16:45 50.3284 01/04/2021 10:16:46 50.3377 01/04/2021 10:16:47 50.4358 01/04/2021 10:16:48 50.275 01/04/2021 10:16:49 50.2457 01/04/2021 10:16:50 50.2651 01/04/2021 10:16:51 50.1993 01/04/2021 10:16:52 50.2269 01/04/2021 10:16:53 50.3896 01/04/2021 10:16:54 50.4118 01/04/2021 10:16:55 50.5105 01/04/2021 10:16:56 50.4858 01/04/2021 10:16:57 50.6171 01/04/2021 10:16:58 50.862 01/04/2021 10:16:59 50.8568 01/04/2021 10:17:00 50.9475 01/04/2021 10:17:01 50.8902 01/04/2021 10:17:02 50.9151 01/04/2021 10:17:03 50.8267 01/04/2021 10:17:04 50.8922 01/04/2021 10:17:05 50.9495 01/04/2021 10:17:06 50.9466 01/04/2021 10:17:07 50.9551 01/04/2021 10:17:08 50.8969 01/04/2021 10:17:09 50.9295 01/04/2021 10:17:10 50.916 01/04/2021 10:17:11 50.7692 01/04/2021 10:17:12 50.7157 01/04/2021 10:17:13 50.6424 01/04/2021 10:17:14 50.6694 01/04/2021 10:17:15 50.6698 01/04/2021 10:17:16 50.5977 01/04/2021 10:17:17 50.5601 01/04/2021 10:17:18 50.5862 01/04/2021 10:17:19 50.5349 01/04/2021 10:17:20 50.6869 01/04/2021 10:17:21 50.6648 01/04/2021 10:17:22 50.5857 01/04/2021 10:17:23 50.5765 01/04/2021 10:17:24 50.4735 01/04/2021 10:17:25 50.3349 01/04/2021 10:17:26 50.2765 01/04/2021 10:17:27 50.3642 01/04/2021 10:17:28 50.3199 01/04/2021 10:17:29 50.2771 01/04/2021 10:17:30 50.276 01/04/2021 10:17:31 50.232 01/04/2021 10:17:32 50.2498 01/04/2021 10:17:33 50.1833 01/04/2021 10:17:34 49.9256 01/04/2021 10:17:35 49.7852 01/04/2021 10:17:36 49.6984 01/04/2021 10:17:37 49.792 01/04/2021 10:17:38 49.9313 01/04/2021 10:17:39 49.8861 01/04/2021 10:17:40 50.0829 01/04/2021 10:17:41 50.098 01/04/2021 10:17:42 50.2326 01/04/2021 10:17:43 50.0788 01/04/2021 10:17:44 49.9797 01/04/2021 10:17:45 49.5801 01/04/2021 10:17:46 49.2258 01/04/2021 10:17:47 48.6573 01/04/2021 10:17:48 47.9983 01/04/2021 10:17:49 47.2267 01/04/2021 10:17:50 46.1877 01/04/2021 10:17:51 45.0976 01/04/2021 10:17:52 43.7603 01/04/2021 10:17:53 42.0626 01/04/2021 10:17:54 40.1578 01/04/2021 10:17:55 38.1442 01/04/2021 10:17:56 35.7467 01/04/2021 10:17:57 33.3245 01/04/2021 10:17:58 30.8047 01/04/2021 10:17:59 28.0541 01/04/2021 10:18:00 25.4789 01/04/2021 10:18:01 22.9019 01/04/2021 10:18:02 20.2417 01/04/2021 10:18:03 18.0677 01/04/2021 10:18:04 15.6886 01/04/2021 10:18:05 13.6489 01/04/2021 10:18:06 11.6886 01/04/2021 10:18:07 10.0426 01/04/2021 10:18:08 8.3489 01/04/2021 10:18:09 7.0131 01/04/2021 10:18:10 5.9991 01/04/2021 10:18:11 5.1315 01/04/2021 10:18:12 4.6019 01/04/2021 10:18:13 4.126

The file FlowData.txt contains volumetric flow rate in cubic meter per hour (m³/h) in the following format:
01/04/2021
10:15:46
50.6221
01/04/2021
10:15:47
50.6098
01/04/2021
10:15:48
50.5353
01/04/2021
10:15:49
50.5856
First column is Date, second is Time, and the third represents flow rate in m'lh.
Write a program that:
1. Reads this data
2. Converts flow rate (F) in mlh to liters per second. 1 m^3 = 1000 liters and 1 hour = 3600 seconds.
3. Computes F/(F - 50.285) , where F is given in m^3/h.
4. Writes the following on the output file: FlowProcessed.txt :
Date
Time
(F) m^3/h
(F) liters/s
X = F/(F-50)
01/04/2021
10:15:46
Value 1
Value 2
Value 3
5. Handles the following errors by showing appropriate message to the user:
File not found.
• Division by zero
• Data Type error
6. Closes both files at the end of the program even if an exception is raised.
Transcribed Image Text:The file FlowData.txt contains volumetric flow rate in cubic meter per hour (m³/h) in the following format: 01/04/2021 10:15:46 50.6221 01/04/2021 10:15:47 50.6098 01/04/2021 10:15:48 50.5353 01/04/2021 10:15:49 50.5856 First column is Date, second is Time, and the third represents flow rate in m'lh. Write a program that: 1. Reads this data 2. Converts flow rate (F) in mlh to liters per second. 1 m^3 = 1000 liters and 1 hour = 3600 seconds. 3. Computes F/(F - 50.285) , where F is given in m^3/h. 4. Writes the following on the output file: FlowProcessed.txt : Date Time (F) m^3/h (F) liters/s X = F/(F-50) 01/04/2021 10:15:46 Value 1 Value 2 Value 3 5. Handles the following errors by showing appropriate message to the user: File not found. • Division by zero • Data Type error 6. Closes both files at the end of the program even if an exception is raised.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L