+ 1

BMI program NEED help!!

I don't understand, why it's not working BMI = imt weight = int(input()) height = float(input()) imt = weight / height**2 if imt < 18.5: print ('Underweight') if (imt >= 18.5 and imt < 25): print ('Normal') if (imt >=25 and imt < 30): print ('Overweight') if imt >=30: print ('Obesity')

3rd Nov 2022, 1:38 PM
Tim
Tim - avatar
3 Respostas
+ 3
It won't output anything if imt >= 18.5. Second if block inside first if block then how imt value if less than 18.5 will also greater than 18.5? Learn about indentation.. You can correct it by yourself. or remove spaces before all if blocks.
3rd Nov 2022, 2:04 PM
Jayakrishna 🇮🇳
3rd Nov 2022, 2:30 PM
Jayakrishna 🇮🇳
+ 1
I removed spaces and it's working I haven't understood this problem for a few days Ty so much dude!!!
3rd Nov 2022, 2:25 PM
Tim
Tim - avatar