0
cant figure out BMI calculator
this is the code i have made weight= int(input()) height= int(input()) BMI=weight/(height*height) if BMI<18.5: print("Underweight") elif BMI<=18.5 and BMI>25: print("Normal") elif BMI<=25 and BMI>30: print("Overweight") elif BMI>30: print("Obesity")
3 Antworten
+ 1
Please read the task description carefully: It asks us to get height as float
+ 1
Aj Day , all your conditional checks after the first "if", except the last one are wrong. Swap everything => BMI >= 18.5 and BMI < 25, BMI >= 25 and BMI < 30.
+ 1
Also you are checking for "not between " , instead of "between" by your elif conditions... think again.