Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed
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 filterO 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 O 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 0 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

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

Decisions Based On Data Analytics For Business Excellence

Authors: Bastian Weber

1st Edition

9358681683, 978-9358681680

More Books

Students also viewed these Databases questions