Question: in python code Task 3: Body Mass Index and Metric Dimensions The body mass index (BMI) is given by the formula weightkg (heightm)2 where weightkg

 in python code Task 3: Body Mass Index and Metric Dimensions

The body mass index (BMI) is given by the formula weightkg (heightm)2

in python code

Task 3: Body Mass Index and Metric Dimensions The body mass index (BMI) is given by the formula weightkg (heightm)2 where weightkg s weight (or, more precisely, mass) in kilograms and height,n s height in meters Write a program that does the following: . Prompts a user for his or her weight in pounds and height in inches Declares global variables kg-per lb-0.45359237 and m.per.inch -0.0254 Calls a function convert.height with parameter height that converts height to me- ters Calls a function convert weight kilograms (i.e., mass) with parameter weight that converts weight to Calls a function calc.bmi) with parameters height.m and mass . Prints the results as given in the examples below Enter weight [pounds] 160 2Enter height [inches]: 72 BMI 21.6996783839 5 Mass = 72.5747792 [kilograms] 6 Height 1.8288 [meters] Another example (this time with float inputs): i Enter weight [pounds]: 130.5 2 Enter height [inches]: 69.5 4BM1 = 18.9949961478 s Mass59.193804285 [kilograms] 6 Height = 1.7653 [meters]

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!