forked from dheeraj3choudhary/Python-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f92e77f
commit cfadb93
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") |