Question: Please write the program in PYTHON language. Please write in PHYTHON language. Write a program that calculates the amount of additional insulin that five Type-1

Please write the program in PYTHON language.

Please write the program in PYTHON language. Please write in PHYTHON language.Write a program that calculates the amount of additional insulin that five

Please write in PHYTHON language.

Write a program that calculates the amount of additional insulin that five Type-1 diabetics should take for the blood glucose level to be above 120mg/dl. In your program, Take the user's name and 12-hour blood glucose values as input. Keep the name and list in a dictionary. Determine the blood glucose values above 120mg/dl for each patient using the filter() function and display on the screen. Input the number of times insulin is taken in 12 hours and these insulin doses. Calculate the total amount of insulin with the reduce() function. - Calculate how much mg/dl blood sugar should decrease for values above 120mg/dl and keep these values in a list. (x120,x is each element of the list of values greater than 120). Write a calculate() function that takes the total amount of insulin and this list as parameters. Use the formula 1800/ total amount of insulin to calculate how many mg/dl a unit of insulin lowers blood sugar. After calculating a unit, calculate how much insulin is needed for each data you keep in the list (x120). (Assume that blood glucose values above 120mg/dl:250,145,189,then the list should be [130,25,69], you should calculate how much insulin is needed for 130mg/dl,25mg/dl,69mg/dl ) Print on the screen how many units of insulin are needed for each patient to reduce blood glucose values above 120mg/dl to normal levels. mple Run: Enter patient name: yaren Enter patient's 12-hour blood glucose values: 147250205187145 10087657598110125 Glucose values over 120mg/dl:[147,250,205,187,145,125 ] How many times did you take insulin in 12 hours? : 4 Enter insulin doses: 82211 Enter patient name: naz Enter patient's 12-hour blood glucose values: 258214189154106 97120126132109132120 Glucose values over 120mg/dl:[258,214,189,154,126,132, 132] How many times did you take insulin in 12 hours? : 5 Enter insulin doses: 942222 Enter patient name: melih Enter patient's 12-hour blood glucose values: 158148135112105 13514713612712099130 Glucose values over 120mg/dl:[158,148,135,135,147,136, 127, 130] How many times did you take insulin in 12 hours? : 4 Enter insulin doses: 7421 12-hour blood glucose values of patients in service: 125], 'naz': [258,214,189,154,106,97,120,126,132,109, 132, 120], 'melih': [158, 148, 135, 112, 105, 135, 147, 136, 127, 120,99,130], 'hilal': [121,115,174,189,214,195,183,157, 134,119,117,110], 'ali': [278,295,200,196,178,166,154, 115,100,98,112,120]} yaren should take 0.18 unit insulin for 147mg/d1 0.87 unit insulin for 250mg/dl 0.57 unit insulin for 205mg/d1 0.45 unit insulin for 187mg/d1 0.17 unit insulin for 145mg/d1 0.03 unit insulin for 125mg/dl ali should take 2.11 unit insulin for 278mg/d1 2.33 unit insulin for 295mg/dl 1.07 unit insulin for 200mg/dl 1.01 unit insulin for 196mg/d1 0.77 unit insulin for 178mg/d1 0.61 unit insulin for 166mg/dl 0.45 unit insulin for 154mg/dl

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!