python-scripts/scripts/BMI/bmi.py

17 lines
466 B
Python
Raw Normal View History

2022-12-24 04:54:53 +00:00
Height=float(input("Enter your height in cm: "))
Weight=float(input("Enter your Weight in kg: "))
2022-10-10 04:24:14 +00:00
Height = Height/100
BMI=Weight/(Height*Height)
2022-12-24 04:54:53 +00:00
print("Your Body Mass Index (BMI) is: ",BMI)
2022-10-10 04:24:14 +00:00
if(BMI>0):
if(BMI<=16):
2022-12-24 04:54:53 +00:00
print("You are severely underweight")
2022-10-10 04:24:14 +00:00
elif(BMI<=18.5):
2022-12-24 04:54:53 +00:00
print("You are underweight")
2022-10-10 04:24:14 +00:00
elif(BMI<=25):
2022-12-24 04:54:53 +00:00
print("You are Healthy")
2022-10-10 04:24:14 +00:00
elif(BMI<=30):
2022-12-24 04:54:53 +00:00
print("You are overweight")
else: print("You are severely overweight")
2022-10-10 04:24:14 +00:00
else:("enter valid details")