0
This code have something wrong and I don't now what
peso = float(input()) altura = float(input()) IMC = (peso/altura**2) if IMC < 18.5: print ("Underweight") if IMC >= 18.5 and IMC <= 24.9: print ("Normal") if IMC >= 25 and IMC <= 29.9: print ("Overweight") if IMC >= 30: print ("Obesity") This should be an imc calculator, and works, but when I run, the case 4 doesn't work, and didn't show me what I put wrong
1 Answer
+ 1
what if IMC like for 24.999 , 29.99 :
instead take <25, <30 as boundaries..
make use of elif