Question: Problem 2 ( 1 point ) John has a body mass of 7 5 kg ; he started drinking at 8 pm , and consumed
Problem point
John has a body mass of kg ; he started drinking at pm and consumed five beers by pm when he stopped drinking.
Complete the code below to calculate John's BAC at midnight, assuming that he started drinking on empty stomach round to three decimal places Note
that one beer counts as one drink.
In :A # look at the above formula: mass of alcohol consumed
r # Widmark factor
W # body mass
B # Note: Python cannot use Greek symbols for variables and parameters, so we use B instead.
t # time from start of drinking to midnightBAC ArWBt
printJohns alcohol concentration at midnight is BAC, "percent per volume."
printSuppose we would like to find the time when John's blood alcohol concentration drops below
The code below creates a table of values for BAC and plots it over the interval where represents pm the time when John started drinking.
Notice that this model stops making biological sense after about
Keep in mind that and BAC are given as arrays, and that you can access particular values using indices just like with lists For example, t refers to the
th value of in the array whereas BAC refers to the nd value of BAC in the array. If you do not remember this, go back and review Lab In : # plot BAC on the interval
a # do not change this
b # do not change this
n # do not change this
t nplinspaceabn # t is the independent variable; we're building a table of values for BAC!
BAC A rt # this completes the table of values for BAC
pltplottBAC
plttitleJohns blood alcohol level"
pltxlabelt t represents pm
pltylabelBAC
pltgrid
pltshowHint : The graph is meant to help you narrow down the ordered pairs you need to print! No need to print ordered
Problem point
Examine the table of values for BAC to find the time when John's BAC falls below for the first time.
Fill in the blank:
John's BAC falls below for the first time hours and minutes round off to the nearest integer minute after pm
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
