Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need a python code for this question. It should be a basic codding by using tools like for, while, list, if, else, elif etc
I need a python code for this question. It should be a basic codding by using tools like for, while, list, if, else, elif etc. I DO NOT WANT A COMPLEX CODDING. Also the output of codding should be like:
WARNING: High values for ''name of the patient" : ''the days of high values"
WARNING: High standard deviation for "name of the patient"
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 CE 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 Sharon Days Thursday 1.1 1.8 2.7 2.4 1.0 0.5 5.5 1.8 2.9 2.1 Wednesday 1.7 1.5 3.1 2.0 1.9 0.2 4.9 2.3 2.5 1.1 Saturday 1.3 1.7 4.5 1.9 1.2 1.3 5.2 WinSINS Friday 1.8 1.9 3.5 3.7 1.2 0.6 5.2 1.8 3.1 1.3 Sunday 1.2 1.5 4.7 2.0 1.1 2.4 4.8 2.4 2.9 1.2 Jack Mary Edward Jessie Debra 2 2.5 2.3 1.3 1 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: '(x, - )? 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 warnedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started