Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

01. A doctor has 10 patients suffering from thyroid diseases. She monitors their thyroid hormone levels (mU/L) on a daily basis. For the last week,

image text in transcribed

01. A doctor has 10 patients suffering from thyroid diseases. She monitors their thyroid hormone levels (mU/L) on a daily basis. For the last week, she obtained the data below: Patient name William Laura Robert Alicia Sharon Jack Mary Edward Jessie Debra Monday 1.0 1.9 3.0 3.5 1.5 0.4 5.0 1.8 2.4 1.5 Tuesday 1.3 1.9 3.3 1.3 1.3 0.4 5.3 1.8 2.1 1.3 Wednesday 1.7 1.5 3.1 2.0 1.9 0.2 4.9 2.3 2.5 1.1 Days Thursday 1.1 1.8 2.7 2.4 1.0 0.5 5.5 1.8 2.9 Friday 1.8 1.9 3.5 3.7 1.2 0.6 5.2 1.8 3.1 1.3 Saturday 1.3 1.7 4.5 1.9 1.2 1.3 5.2 2.5 2.3 Sunday 1.2 1.5 4.7 2.0 1.1 2.4 4.8 2.4 2.9 1.2 2.1 1.3 To help her checking patients' test results, construct three lists: two one-dimensional lists for patient names and days as well as one two-dimensional list for hormone levels. While accessing the data, efficiently utilize these three lists via proper indexing. For instance, hormone_list[1][3] corresponds to Laura's (name_list[1]) hormone level on Thursday (day_list[3]). Keeping this in mind, write the shortest computer program (i.e. only one outer loop) that satisfies the following requirements: Normal range for thyroid hormone is 0.4 - 4.0 mU/L. For each patient, values lower than 0.4 and values higher than 4.0 (if any) should be temporarily stored in separate lists (i.e. days_high and days_low) and be printed to warn the doctor. Print this information using list comprehension structures. Calculate the weekly average for each patient without using sum function. If this average is outside the normal range, doctor should be warned. Calculate weekly standard deviation for each patient using the following equation: 21(xi - x)2 SD = n-1 where n is the number of data points, Xi is a data point, and x is the average of data points. Again, sum function is not allowed. If standard deviation is greater than 0.5, doctor should be warned. Your output should look like the following: WARNING: High values for Robert: Saturday Sunday WARNING: High standard deviation for Robert WARNING: High standard deviation for Alicia WARNING: Low values for Jack: Wednesday WARNING: High standard deviation for Jack

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

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions