How To Create Own BMI Calculator in Python!

Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI is defined as the body mass divided by the square of the body height, and is expressed in units of kg/m2, resulting from mass in kilograms and height in metres.

Now, we Make a Python Program for calculate your BMI(Body Mass Calclutar).

Formula of BMI
BMI = weight (kg) ÷ height2 (m)

BMI(Body Mass Calculator), so now we are creating a python program to calculate BMI

print(“Calculate your BMI(Body Mass Index) here !”)

height = float(input(“Enter your Height in Meter: “)) ##Please be Sure your Height in meter e.g(1.67)
weight = float(input(“Enter your Weight in Kg: “)) ## weight in kilogramg e.g. (67)
bmi = round(weight / height ** 2)

## after variable we use IF/ELSE Statement like if :-
## Underweight = <18.5 ## Normal weight = 18.5–24.9
## Overweight = 25–29.9
## Obesity = BMI of 30 or greater

if bmi < 18.5:
print(f”your BMI is underweight ☹️{bmi} \n”)
elif bmi < 25:
print(f”your BMI is normal weight ? {bmi} \n”)
elif bmi < 30:
print(f”your BMI is overweight ? {bmi} \n”)
elif bmi < 35:
print(f”your BMI is overweight ? {bmi} \n”)
else:
print(f”Your BMI is you are clinically obese{bmi} \n”)

OUTPUT:-

Thank You ! ❤️

 

Check out : How can we know type of element in Python

Leave a Reply

Your email address will not be published. Required fields are marked *