Please help me know where am i going wrong in logic

I am getting only true as answer, please let me know what’s wrong in my logic