Code coach is giving 4/5. My code seems OK, but why I can't pass the code coach, and what is the problem??? | Sololearn: Learn to code for FREE!
0

Code coach is giving 4/5. My code seems OK, but why I can't pass the code coach, and what is the problem???

BMI calculator from code coach, passing 4/5, everything seems ok but can't pass the #3 test case https://code.sololearn.com/cCii7JLPgg6E/?ref=app

4th Feb 2021, 1:51 PM
Adilet Kambarov
Adilet Kambarov - avatar
2 Answers
+ 3
First, remove that "who are you?" though it will never be executed anyway. When you want to have multiple conditions, you have to hardcode each variable using comparison logical operators. For example: 18.5 <= bmi < 25 # should be bmi >= 18.5 and bmi < 25 More explanation in my past answer regarding logical operators in this thread: https://www.sololearn.com/Discuss/2676670/?ref=app https://code.sololearn.com/cR0hGymTV3ve/?ref=app
4th Feb 2021, 2:02 PM
noteve
noteve - avatar
+ 1
In line no 11, change it into smaller than sign
4th Feb 2021, 2:01 PM
Atul [Inactive]