Program to Calculate Body Mass Index (BMI)
The Body Mass Index (BMI) or Quetelet index is a value derived from the mass (weight) and height of an individual, male or female. The BMI is defined as the body mass divided by the square of the body height and is universally expressed in units of kg/m2, resulting from the mass in kilograms and height in meters. The formula is:
BMI = (mass or weight)/(height*height) where, mass or weight is in Kg, height is in meters
Input : height(in meter): 1.79832 weight(in Kg): 70 Output : The BMI is 21.64532402096181, so Healthy. Explanation : 70/(1.79832*1.79832) Input : height(in meter): 1.58496 weight(in Kg): 85 Output : The BMI is 33.836256857260594 so Suffering from Obesity Explanation : 70/(1.58496*1.58496)
The BMI is 21.64532402096181 so Healthy
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course