Practice question · Sort into groups
Let x be 4 and y be 9. Sort each condition by its value.
Groups: True · False
- x < y
- (x > 5) or (y > 5)
- (x > 5) and (y > 5)
- (x == 4) and (y == 4)
- x != y
- not (x < y)
Hints
- Evaluate each comparison separately before applying and, or, not.
- The last two differ only in the connective, and one of x, y fails the test.
Show the answer
True: x < y, x != y, (x > 5) or (y > 5)
False: (x == 4) and (y == 4), not (x < y), (x > 5) and (y > 5)
Why
4 < 9 and 4 != 9 hold; negating a true condition gives false; y == 4 fails so the conjunction in c2 fails. c5 is true because y > 5, but c6 fails because x > 5 does not, and demands every part, or demands only one.
Practise Conditionals and Boolean Logic
The app has 7 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.