Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Covid testing data collection utility. def main() : results = [] while True: print() name = input(Name (or stop): ) if name == stop: break

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Covid testing data collection utility. def main() : results = [] while True: print() name = input("Name (or stop): ") if name == "stop": break answer = input("Test positive? [y,n]: ") if answer == "y": test_result = 1 elif answer == "n": test_result = 0 else: print("Invalid input, please try again") continue q = float(input("Sample quality: ")) t = int(input("Minutes since last calibration : ")) if not is_valid_sample(a): print("Invalid sample, stopping!") hrool break elif not is_valid_calibration(t): print("Invalid calibration, stopping!") break else: results.append( [name, test result, q, t]) save_results (results) def save_results(results): "Write existing test data. This function accepts a list of tests results and writes them to the file covid-results.csv. pass # TODO: write the test results 11 !!! 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 11 !!!! 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

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

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

=+What is our leadership style like?

Answered: 1 week ago