need help with logics

That’s really what I was implying - don’t count on what you may think you know about operator precedence.