Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Page 90 of 93 Please pair up with another student in your lab! I. For each of the following, write a program that computes and

image text in transcribed

Page 90 of 93 Please pair up with another student in your lab! I. For each of the following, write a program that computes and displays the minimum, maximum and average rainfall by processing the data in a file named rainfall, txt 1. Iterating over the file with a for loop 2. Using the readline() method 3. Using the readlines () method 4. Using the read() method I. Write a program that writes a temperature conversion table to a file named temp_conv. txt The table should include temperatures from -300 to 212 degrees Fahrenheit and their Celsius equivalents, presented in two columns with appropriate headings Each column should be 10 characters wide, and each temperature should have 2 digits to the right of the decimal point Recall that the formula for this conversion is: temp _in_celsius = 5 / 9 * (temp_in _fahrenheit 32) Output displayed for Exercises 1-4 Output file generated from Exercise 5 III. Exception Handling Note: You can find information about Built-in Exceptions - especially the Hierarchy Tree - in Section 5 of the Python Standard Library, and you can find information about Errors and Exceptions in Section 8 of the Python Tutorial 1. Modify the program in I.3. above to allow multiple files to be processed 2. Echo the data back to a new file called rainfall_copytxt 3. Incorporate thorough exception handling as that found in FileIOWith Repeats.py Page 90 of 93 Please pair up with another student in your lab! I. For each of the following, write a program that computes and displays the minimum, maximum and average rainfall by processing the data in a file named rainfall, txt 1. Iterating over the file with a for loop 2. Using the readline() method 3. Using the readlines () method 4. Using the read() method I. Write a program that writes a temperature conversion table to a file named temp_conv. txt The table should include temperatures from -300 to 212 degrees Fahrenheit and their Celsius equivalents, presented in two columns with appropriate headings Each column should be 10 characters wide, and each temperature should have 2 digits to the right of the decimal point Recall that the formula for this conversion is: temp _in_celsius = 5 / 9 * (temp_in _fahrenheit 32) Output displayed for Exercises 1-4 Output file generated from Exercise 5 III. Exception Handling Note: You can find information about Built-in Exceptions - especially the Hierarchy Tree - in Section 5 of the Python Standard Library, and you can find information about Errors and Exceptions in Section 8 of the Python Tutorial 1. Modify the program in I.3. above to allow multiple files to be processed 2. Echo the data back to a new file called rainfall_copytxt 3. Incorporate thorough exception handling as that found in FileIOWith Repeats.py

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: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

What is meant by a firms positioning strategy?

Answered: 1 week ago