According to Wikipedia , Morgan's Law (which for me was just what I knew)
NOT (P AND Q) = (NOT P) OR (NOT Q)
In your question, P will map to (x>5) and Q to (y>7) . Therefore !((x>5)&&(y>7)) is your answer. But you do not have one on the list. (Your teacher is sloppy if this is your real question, since only one suggested answer has double parentheses, which is a huge key - you can exclude b because it still uses || and excludes others due to the lack of a double round of the parenthesis going straight to e.)
If you really cannot make these things stand still, use the values of the samples that the question asks. (If necessary, do a little.) x>5 true for x = 7. y>7 is not true for y = 5. so you have !true || !false !true || !false , which is false || true false || true , which is true . Evaluate each of the possible expressions and exclude those that do not answer the same answer. If you are still lost, select different sample values and retry. One of the possible answers will contain a match, or none of them will allow you to go to "none of the above." This will earn you a mark, even if you really don't understand why.
As to why, it is because of the opposite behavior of && and || . The only way to get true value from && is with truth from both sides. The only way to get a lie from || - with a lie on both sides. If you flip the options with ! , you can flip the operator and get the opposite result.
source share