0
So, I made a BMI calculator, but the output is always 'underweight' does anyone have a solution?
2 Respostas
+ 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')
+ 2
OMG, it works, thank you sir