0

So, I made a BMI calculator, but the output is always 'underweight' does anyone have a solution?

https://code.sololearn.com/ck7Ac0145nAV/?ref=app

26th Mar 2022, 5:48 AM
Subekti Suryo
Subekti Suryo - avatar
2 Antworten
+ 5
In float number 18,5 use dot "." not comma "," weight = 50 height = 1 bmi = (weight / (height**2)) if(bmi < 18.5): print('Underweight') elif(bmi >= 18.5 and bmi < 25): print('Normal') elif(bmi >= 25 and bmi < 30): print('Overweight') else: print('Obesity')
26th Mar 2022, 6:04 AM
Raju Adhikary
Raju Adhikary - avatar
+ 2
OMG, it works, thank you sir
26th Mar 2022, 6:05 AM
Subekti Suryo
Subekti Suryo - avatar