+ 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')
3 ответов
+ 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.
+ 3
You're welcome..
https://code.sololearn.com/cT5BRIbkia21/?ref=app
Hope this helps more about indentation
https://www.sololearn.com/discuss/2534829/?ref=app
https://www.sololearn.com/discuss/2204604/?ref=app
+ 1
I removed spaces and it's working
I haven't understood this problem for a few days
Ty so much dude!!!