Question: Hi! Can you please help me with the following PYTHON PROGRAMMING TASK. There are already similar answers but the criteria for this one is a
Hi! Can you please help me with the following PYTHON PROGRAMMING TASK. There are already similar answers but the criteria for this one is a little change so please try to read the requirments. "Yes it needs to be done in python " for those who are asking
You are working for a Bio-pharmaceutical company that is in the process of running trials on a new drug. The drug is to be used to help people combat severe pain. One of the important parameters for determining dose amount and frequency is the length of time the drug stays active in the bloodstream of the patient. In particular, the half life of the drug can be estimated as:

where : Ct is the concentration in ug/L at time t C0 is the initial concentration in ug/L and t is the time in hours. k is the time constant (1/hrs). Use a value of 0.95 in this question. t1/2 is the half-life in hrs.
Some experimental data has been collected on a few patients as shown below:
| Patient# | C0(ug/L) | Ct(ug/L) | t(hrs) |
|---|---|---|---|
| 1 | 325 | 160 | 2.0 |
| 1 | 600 | 100 | 6.2 |
| 2 | 325 | 220 | 1.0 |
| 3 | 600 | 200 | 4.4 |
| 4 | 325 | 100 | 3.0 |
| 4 | 325 | 88 | 3.2 |
| 2 | 600 | 200 | 3.3 |
| 2 | 325 | 100 | 3.3 |
| 4 | 600 | 210 | 3.4 |
| 5 | 325 | 105 | 3.5 |
| 1 | 600 | 110 | 6.0 |
| 3 | 325 | 100 | 3.1 |
| 2 | 600 | 120 | 5.5 |
| 2 | 600 | 125 | 5.5 |
| 5 | 120 | 60 | 2.2 |
| 2 | 325 | 100 | 3.4 |
Store the above data in a file named A2_input.txt. You are to develop a menu-driven program that will allow the analyses of this data.
Write a program that does the following:
The main program loads the input data into a list. It then calls the analyzeData function to do one of the three options below:
Option 1: Gets a patient number (values are from 1 to 5). For this patient number, the program must be able to calculate t. If there are more than one entry in the database stored in the file, then the program should report the number of data for the patient and determine the average of the patients data.
Option 2: Gets three patient numbers (values are from 1 to 5). Does the above for each patient and after knowing the t1/2 of each patient, the program determines the average t of the three users.
Option 3: Exits. A separate function called halfLife is to be used for calculating the t based on C0, Ct and t that are in the data file. A third function longest must also be used to determine the two patients with the longest average t from the three different patients. All printing must happen via the main function. You cannot use global variables in your program.
1/2 = - kt * 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
