Skip to content

Commit

Permalink
Update Body_Mass_Index(BMI).py
Browse files Browse the repository at this point in the history
  • Loading branch information
BiresashisDas authored May 10, 2022
1 parent f92e77f commit cfadb93
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Programs/Body_Mass_Index(BMI).py
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# Author :- Biresashis Das

# How to calculate a Body mass index.

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

#The BMI is calculated by dividing a person's weight(in kg) by the square of their height(in m).
BMI = weight / (height**2)
print(round(BMI))

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

0 comments on commit cfadb93

Please sign in to comment.