Question: LANGUAGE: PYTHON (URGENT) Test_covid.py test suite Whether or not results are valid : Background The Department of Health and Human Services has noticed the large

LANGUAGE: PYTHON (URGENT)

LANGUAGE: PYTHON (URGENT) Test_covid.py test suite Whether or not results are valid

Test_covid.py test suite

: Background The Department of Health and Human Services has noticed the

Whether or not results are valid : large volume of high quality test data coming from your lab. Top

Background The Department of Health and Human Services has noticed the large volume of high quality test data coming from your lab. Top officials in HHS met last week with your Director to better understand why that might be the case, and she highlighted your team's work on the COVID data entry program. The IT department at HHS has asked if it might be possible to restructure your program using object oriented programming techniques so that it can be distributed and reused more widely by other labs. They have given you a test suite (see below) that demonstrates how they would like the CovidTestResult class to behave. Instructions Create a module named covid which contains a class called CovidTestResult .(2 points) Define the CovidTestResult class constructor so that it takes two arguments: sample_quality and last_calibration which it sets as properties of the new object. (2 points) Define a method is valid which returns True or False depending on whether the CovidTestResult is valid accou points) Write docstrings for your class and its methods that document how the code is to be used. (2 points) Run the supplied test suite test covid.py to make sure that it is working as expected. (2 points) Upload your covid.py file as your submission. from covid import CovidTestResult def test_valid(): c = CovidTestResult(.96, 3) assert c.is_valid(), "test result is valid" def test_invalid_sample(): c = CovidTestResult(.91, 3) assert not c.is_valid(), "sample is invalid" def test_invalid_calibration(): c = CovidTestResult(.96, 8) assert not c.is_valid(), "calibration is invalid" def test_all_invalid(): c = CovidTestResult(.8, 10) assert not c.is_valid(), "sample and calibration are invalid" def is_valid_sample( sample_quality): "'"'Test if the sample quality is acceptable. Returns True if the sample quality is high enough for valid test results and, False if it is not. if sample_quality > .9: return True else: return false def is_valid_calibration(calibration_time): ""Test if the calibration is acceptable. Returns True if the calibration time is low enough for valid results, and False if it is not. if calibration_time

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!