Learn practical skills, build real-world projects, and advance your career
!pip install jovian --upgrade --quiet
import jovian

BMI Calculator

This is an attempt to learn more of coding in python, so hope this will help boost your imagination to do more of such excersices to keep ypu engaged in coding. As we know coding is a repeatative process and needs alot of patience and repetation.

Let's Jump on then,

BMI introduction (Gyan)

BMI is a measurement of a person's leanness or corpulence based on their height and weight, and is intended to quantify tissue mass. It is widely used as a general indicator of whether a person has a healthy body weight for their height. Specifically, the value obtained from the calculation of BMI is used to categorize whether a person is underweight, normal weight, overweight, or obese depending on what range the value falls between. These ranges of BMI vary based on factors such as region and age, and are sometimes further divided into subcategories such as severely underweight or very severely obese. Being overweight or underweight can have significant health effects, so while BMI is an imperfect measure of healthy body weight, it is a useful indicator of whether any additional testing or action is required. Refer to the table below to see the different categories based on BMI that is used by the calculator.

def bmi_calculator(name, height_cm, weight_kg):
    bmi = round(weight_kg / ((height_cm/100)**2))
    print("bmi: ")
    print(bmi)
    if bmi < 25:
        return name +" "+ "is not overweight"
    else:
        return name +" "+ "is overweight"
bmi_calculator("Supreet", 175, 65)
bmi: 21
'Supreet is not overweight'