Question: This function is called after all the input data have been specified, see the last line in the sample code The function has 5 inputs.

This function is called after all the input data have been specified, see the last line in the sample code
The function has 5 inputs. The names for the inputs have been chosen to match their roles in the description earlier.
The function should return one output which can be a list of lists, an empty list or a string depending on the situation
The expected steps within the function run_diagnostic() are:
The function should first check whether all algorithmic parameters are valid. If any of the algorithmic parameter is invalid, the function should return the string 'Corrupted input'. It should not proceed to execute the next two steps.
If all algorithmic parameters are valid, the function should determine whether there are enough data in flow_rate for the calculations. If there are not enough data in flow_rate, the function should return the string 'Not enough data'. It should not proceed to execute the next step.
If all algorithmic parameters are valid and there are enough data, then the function should proceed to determine the episodes. The function should return either an empty list or a list of lists.
You can use the following test files: test_run_diagnostic_1.py, test_run_diagnostic_2.py and test_run_diagnostic_3.py.
For both test_run_diagnostic_1.py and test_run_diagnostic_2.py, there are enough data and all algorithmic parameters are valid. Your code should proceed to compute the episodes.

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 Databases Questions!