Share your repls and programming experiences

← Back to all posts
BMI Calculator and interpretation
SolMegerssa (0)

🚨 Don't change the code below 👇

height = float(input("enter your height in m: "))
weight = float(input("enter your weight in kg: "))

🚨 Don't change the code above 👆

#Write your code below this line 👇

BMI = weight/height**2
BM = "{:.2f}".format(BMI)

if BMI<18.5:
print(f"Your BMI is {BM} and you are underweight.")
elif BMI <25:
print(f"Your BMI is {BM} and you have normal weight.")
elif BMI <30:
print(f"Your BMI is {BM} and you are slightly overweight.")
elif BMI <35:
print(f"Your BMI is {BM} and you are obese.")
else:
print(f"Your BMI is {BM} and you are clinically obese.")