In: Computer Science
Which one of the following expressions evaluates to True?
Select one:
5 > 1 and 1 == 5
5 > 9 or 2 < 0 or not 42 > 1
not 8 < 5 and not 10 == 3
not (15 == 15 or 15 < 0)
36 == 35 or 35 > 2 and 35 < 0
a) 5>1 and 1==5
For the above statement, 5 is greater than 1, so its true.
1 is not equal to 5, so it is false.
Now, two Statements are related to and. One is true and other is false. So true and false gives false.
Hence, final result is FALSE.
b) 5 is not greater than 9. So, it gives false.
2 is not less than 0. So, it gives false
42 is greater than 1. Not of that means not of true. So, it gives false.
So, three False statements are connected with or.
Hence, the final result is False
c) 8 is not less than 5. Not of that gives True.
10 is not equal to 3. Not of that gives True.
So two true statements are connected by and.
Hence, final answer is True.
d) 15 is equal to 15. So it gives true.
15 is not less than 0. So it gives False.
Or of both the statements gives true.
Not of true gives False .
Hence, final answer is False
e) 36 is not equal to 35. So it gives false
35 is greater than 2. So, it gives true.
35 is not less than 0. So, it gives false.
So, or of false and true gives true.
And then, and of true and false gives false
Hence, final answer is false.
So, out of all 5 options only c option gives True.
Hence, correct answer is (C).