Question: Write a simple command-line application in python, bmi_app(), that reads a user's height (in inches) and weight (in pounds) and reports their BMI and their

Write a simple command-line application in python, bmi_app(), that reads a user's height (in inches) and weight (in pounds) and reports their BMI and their BMI category.. using code for bmi_cat.

def bmi_cat(bmi): if bmi < 18.5 : return "underweight" elif 18.5 <= bmi < 25: return "normal" elif 25 <= bmi < 30: return "overweight" elif bmi >= 30: return "obese" 

output should be:

>>> bmi_app() Enter your weight in pounds: 190 Enter your height in inches: 74 Your BMI is 24.391892. You are normal. >>> bmi_app() Enter your weight in pounds: 120 Enter your height in inches: 74 Your BMI is 15.405405. You are underweight.

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!