0

Why this code is wrong?

Sorry if this question has already been solved, but I have finished the python for begginers course and i can't understand why this code is wrong when y try it in the BMI problem. It pass all test except one :( sorry for my English https://code.sololearn.com/cZR3fWcOBxNK/?ref=app

4th Jan 2022, 9:40 PM
Álvaro Paiz
Álvaro Paiz - avatar
3 Answers
+ 2
If 24.9 < IMC < 25, the code returns "Obesity". Is that correct? You use ">" in some comparisons, then "<" in others. This makes it confusing to read. Better to stick to one of them Your 2 "elif" comparisons repeat one previous comparison. Can you find them and fix? Also, paste the problem description in your question. I'd like to double check the comparisons.
5th Jan 2022, 2:52 AM
Emerson Prado
Emerson Prado - avatar
+ 1
I didn't find the reason, but you can input the two parameters separated by an Enter.
5th Jan 2022, 1:11 AM
FanYu
FanYu - avatar