The Body Mass Index (BMI) is a quick way to assess your body size simply with your weight and height, regardless of your gender. Quickly calculate your BMI and find out which category you fall into.
The Body Mass Index (BMI) is the only index validated by the World Health Organization to assess an individual’s build and therefore health risks. The BMI makes it possible to determine whether one is the situation of thinness, overweight or obesity for example.
In this program we will calculate BMI. Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women.
Python Program to Calculate Your Body Mass Index
Write a program that computes the body mass index (bmi) of an individual in Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | print("Enter person's information:") height = float(input("height (in inches)? ")) weight = float(input("weight (in pounds)? ")) bmi = weight / height** 2 * 703 if bmi < 18.5: print("underweight") elif bmi < 25: print("normal") elif bmi < 30: print("overweight") else: print("obese") |
Output: