0
Why my code doesn't work?
I don't understand why my code doesn't work. a = int(input()) b = float(input()) res = a / (b * b) if res < 18.5: print ("Underweight") elif res >= 18.5 and < 25: print ("Normal") elif res >= 25 and < 30: print ("Overweight") elif res >= 30: print ("Obesity")
3 Answers
+ 2
In the 2nd and 3rd elif-condition res is missing:
res >= 18.5 and res < 25
res >= 25 and res < 30
+ 1
Remove 'and' from elif condition
0
Thanks!