0
Problem with BMI calculator task
So I have a problem that says that my “Obesity” can not be calculated, it is calculated as “Underweight” instead Height=int(input()); Weight=float(input()); x=Weight/float(Height**2); if x < 18.5: print ("Underweight") elif x >=18.5 and x<25: print ("Normal") elif x >= 25 and x <30: print ("Overweight") elif x >= 30: print ("Obesity")
2 Respostas
+ 4
You need to use float() for height.
According to the task, Weight should be the first input variable
Weight=float(input())
Height = float(input())
+ 1
Simba thanks!!