Question: Programming in PYTHON Another calculation, and selection) Write a function to calculate a person's body mass index (BMI), and a function to categorize this index,

Programming in PYTHON

Programming in PYTHON Another calculation, and selection) Write a function to calculate

Another calculation, and selection) Write a function to calculate a person's body mass index (BMI), and a function to categorize this index, and add them both to bmi.py. a. bmi(inches, pounds) - returns the index using the formula below. b. category(index) - returns the string category of the index. At left is the formula for calculating BMI, given a person's weight in kilograms and height in meters. Your bmi function starts with the weight in pounds and height in inches, so you must convert to the metric units to calculate BMI. There are 2.20462262 pounds in one kilogram, and there are 39.3700787 inches in a meter. Your category function is passed a bmi value, and it must return one of the strings in this list: 'Underweight', 'Normal', 'Overweight', 'Obese'] in accordance with the following table: Here are some sample results from our solution: -bash-4.2$ python3 bmi.py enter height in inches: 69 enter weight in pounds: 175 BMI is 25.8: Overweight -bash-4.2$ python3 bmi.py enter height in inches: 64.2 enter weight in pounds: 118.5 BMI is 20.2: Normal

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!