Question: Assignment / - Reaaing from files, storing inside a LIST as you create functions. RESOURCES: Chapter 5 - FUNCTIONS / MODULES; Chapter 7 - Creating

Assignment /- Reaaing from files, storing inside a LIST as you create functions.
RESOURCES: Chapter 5-FUNCTIONS/MODULES; Chapter 7- Creating A List of values/objects
Videos, sample pseudocode, and python programs under Week #05
(Worth 15 points)
PROBLEM DESCRIPTION: & PURPOSE -
Continue to define functions where appropriate:
Store functions in separate customized file
Read numerical data from a file and store inside a list,
store as a list, manipulate it using statistical functions and
write results to an output file.
Write a python program that will read a list of daily rain falls and store inside a list data structure. The program must include at
least four different customized functions.
DESIGN:
Use either:
a. A flowchart program such as flowgorithm or Visio or similar program or
b. Pseudocode to design and solve the problem.
Save the pseudocode or flowchart as:
Lastname_firstname_A07_RainFall_List_Design
PYTHON CODE:
Express the design using python 3.12 or higher. Save the source code of python as:
Last PROCESSING:
Create a main function for the main program.
Use the files for opening files for reading and writing from the In_fn_Customized_Functions.py
Create a function that reads the data from the rainfall_revised file and stores positive numerical data inside a list called
rainfall.
Write the appropriate headings as shown in the list inside the file for writing output
Lastname_firstname_A07_RainFall_List_Output.txt
Create a function to write the unsorted list of rainfalls.
Use the built-in function sorted to sort the list in ascending order
Write the heading for the sorted list.
Write the actual sorted rainfall list.
Use the built-in function len to determine the number of rainfalls inside the list.
Use the built-in function mean to find the average rainfall.
Use the built-in function min to determine the minimum rainfall in the list.
Use the built-in function max to determine the maximum rainfall in the list.
** Note you may use the with clause read/write data to files as they do not require a close statement. But they still need to
be set up as different functions.
You may use the while loop version or for/ loop to read the different daily rainfalls.
Once you create the functions, please call them in the program and test the program.
18.
Step #2- remove only the sub functions from the main program. DO NOT REMOVE THE MAIN FUNCTION from your
source code. and save them to a separate python file called:Lastname_firstname_Custom_Functions.py
At the beginning of the main source program with the main function you will import the:
Lastname_firstname_Custom_Functions.py
inside this main source:
program Lastname_firstname_A07_RainFall_List.py
use the following statement
from Lastname_firstname_Custom_Functions import *
Make sure this statement is placed at the beginning of your Source program outside the main function.
DO NOT INCLUDE THE .py when importing a file in the main source code of python.
If in doubt, view the videos under Week 5 along with previous videos from week #04,name_firstname_A07_RainFall_List.py
Assignment / - Reaaing from files, storing inside

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!