Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

question in picture r]I nuznwu' Illllln Problem 2 [1 new John has body mass of 75 kg; he started drinking at 3pm. and consumed ve

question in picture

image text in transcribedimage text in transcribed
r]I nuznwu' Illllln Problem 2 [1 new John has body mass of 75 kg; he started drinking at 3pm. and consumed ve beers by 10pm. when he stopped drinking. What is John's BAG at midnight? Complete the code below to calculate John's BAG at midnight. assuming that he started drinking on empty stomach ('round to three decimal places'}. One beer counts as one drink. tart by entering the missing values # look at the above formula: 0.l* mess of alcohol consumed a! winner): factor a? body mass 0.015 # Note: Python cannot use Greek symbols for variables and parameters, so we use 3 instead. # time from start of drinking to midnight #You will get an ERROR message if you run this cell without entering the missing values above sec - s/(rnms-t printt'John's alcohol concentration at midnight is",Bnc,"percent per volume.") # note how to combine text and numbers in output File "ltmp/ipykernel_l1?/15?231?854.py", line 2 A = # look at the above formula: D.1* mass of alcohol consumed a SyntaxError: invalid syntax John needs to drive home. and decides to wait until his BAD falls just below 0115 (the BAC oi D.D5 or higher can result in a charged for Impaired driving; the BAC oi I105 or higher is classied as driving under inuence; both offences carry severe consequences and possible criminal charges]. The code below creates a table oi values for BAC and plots it over the intewal [0, 12]. where I = 0 represents 8pm, the time when John started drinking. {Notice that this model stops making biological sense alter about t = 8) Keep in mind that t and BAG are lists. and that you can print their individual values. such as I[23] or BAG[51] (if you do not remember this. go back to Lab 0]. Problem 1 (1 point. Enter your answer to this, and all other questions, into Childsmath) By experimenting, find the INTEGER value of a so that BMI = a - m 72 . when used with pounds and inches, gives the correct BMI (when the BMI is rounded to two decimal places"). Note: you should be able to explain how to arrive at the value of a without guessing (hint: look at homework assignment 6, question 5; so, it has to do with the conversion of units). In [42]: # calculating BMI in kg and m m = 72 h = 1. 71 BMI = m/h*#2 print ( "Using kilograms and metres we obtain the correct BMI of", BMI) # calculating BMI in 1b and in MLB = m*2.205 hINCH = h*39.37 BMIinLBINCH = mLB/hINCH**2 print ( "Substituting pounds and inches into BMI=m/h^2 gives", BMIinLBINCH, "which is obviously not correct") # modifying BMI formula for 1b and in a = 1 # experiment with different integer values of a; enter a single value for a BMI = a* mLB/hINCH* *2 print( "With a=", a, "the modified formula for BMI gives", BMI) Using kilograms and metres we obtain the correct BMI of 24. 622960911049557 Substituting pounds and inches into BMI=m/h*2 gives 0.035028217675057455 which is obviously not correct With a= 1 the modified formula for BMI gives 0. 035028217675057455 Now that you guessed the value of a in the code above, try to combine the conversion factors 2.205 and 39.37 using mathematical operations (as shown in Lab 0) to obtain the same (or approximately same) value of a. In [43]: # Experiment with the conversion factors; enter different combinations. a = # You will get an ERROR MESSAGE if you run this cell without entering anything for a print (a) # Does this make sense? why? File "/tmp/ipykernel_117/1943019842.py", line 3 1 = # You will get an ERROR MESSAGE if you run this cell without entering anything for a SyntaxError: invalid syntax

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

Graphical Approach To College Algebra

Authors: John E Hornsby, Margaret L Lial, Gary K Rockswold

6th Edition

0321900766, 9780321900760

More Books

Students also viewed these Mathematics questions

Question

Define Administration?

Answered: 1 week ago