-
Notifications
You must be signed in to change notification settings - Fork 0
/
bmi.py
29 lines (23 loc) · 1.32 KB
/
bmi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
height=float(input("Please enter your height in centimeters: "))
weight=float(input("Please enter your Weight in Kg: "))
height = height/100
BMI=weight/(height*height)
print("Your Body Mass Index (BMI) is: ",round(BMI,2)) #Printing BMI with 2 decimal points
if(BMI>0):
if(BMI<=16):
print("According to the World Health Organization(WHO) you belong to the Severe Thinness category.")
elif(BMI<=17):
print("According to the World Health Organization(WHO) you belong to the Moderate Thinness category.")
elif(BMI<=18.5):
print("According to the World Health Organization(WHO) you belong to the Mild Thinness category.")
elif(BMI<=25):
print("According to the World Health Organization(WHO) you belong to the Normal category.")
elif(BMI<=30):
print("According to the World Health Organization(WHO) you belong to the Owergeight category.")
elif(BMI<=35):
print("According to the World Health Organization(WHO) you belong to the Obese Class I category.")
elif(BMI<=40):
print("According to the World Health Organization(WHO) you belong to the Obese Class II category.")
else:
print("According to the World Health Organization(WHO) you belong to the Obese Class III category.")
else:("The details you have entered are not correct. Please try again")