First it checks if 5 <= 10, which it is, so now weight is 'light'. The problem is that after checking that, it checks if 5 <= 69, which is also correct, and weight gets changed to 'heavy'. To fix this you would want to change the second elif to check for 10 < weight <= 69.