So I don’t think my code is behaving incorrectly, I could just use some clarification on the order that things seem to be executing in. My main confusion is: is the reverse operator
!() processed before objects within parenthesis?
My issue is this:
test_1 should be true.
test_1 = !(3 < 5 || 5 < 3 && 33 < 12)
My line of reasoning with this is as follows:
3 < 5 == true so I can discard the
"5 < 3" segment because of the either/or
Then to the right of the and operator:
33 < 12 == false.
So in my mind the entire statement is false because the and operator requires both sides to be correct, and the right side is blatantly false.
Then by adding
!() around the entire equation I expected to get an answer of true since the code inside returns a value of false, but I appear to be receiving an answer of false, and hence my confusion…
Could anyone shine some light on this?