There is an bug in learn python

the issue is in conditional statements module

see here the output is as same as the given output in the question

This means your code is failing on hidden test cases.

i think both the conditions must be true