Lecture "Programming languages", exercise 1
Opened this issue · 19 comments
What is the boolean value of not (not True or False and True) or False
?
True
Work:
not (not True or False and True) or False
not (False or False and True) or False
not (False or False) or False
not (False) or False
True or False
True
not(((not T) or F) and T) or F -> not((F or F) and T) or F -> not( F and T) or F ->not F or F ->
T or F -> T
The Value is TRUE because:
-not TRUE is FALSE - not (False or False and True) or False
-FALSE and TRUE is FALSE - not (False or False) or False
-FALSE or FALSE is FALSE - not (False) or False
-Not FALSE is TRUE - True or False
-TRUE or FALSE states TRUE
not (not True or False and True) or False
-> not (False or False and True) or False
-> not (False or False) or False
-> not False or False
-> True or False
-> True
Given the statement: not (not True or False and True) or False
the order of operation as I understood it should be not->and->or, and parentheses before everything else, so:
not (False or False and True) or False
not (False or False) or False
not False or False
True or False
True
The boolean value is True
Procedure:
not (not True or False and True) or False
not (False or False and True) or False
not (False or False) or False
not False or False
True or False
True
As my colleagues answered before I believe the answer is True:
not(not True or False and True) or False
not(False or False and True) or False
not(False and True) or False
not(False) or False
True or False
True
The boolean value should be True:
not (not True or False and True) or False
not (False or False and True) or False
not (False or False) or False
not False or False
True or False
True
True:
not(not True or False and True) or False
not(False or False and True) or False
not(False or False) or False
not False or False
True or False
True
The boolean value is TRUE. The method followed is checking the values on the table 1 and replacing terms with the corresponding boolean values.
Not (not-True or False-and-True) or False
Not (False or False) or False
Not (False) or False
True o False
True
not (not True or False and True) or False
- not (False or False and True) or False
- not (False or False) or False
- not False or False
- True or False
- True
no(not True or False and True) or False
not(False or False and True) or False
not(False or False) or False
not False or False
True or False
True
not (not True or False and True) or False?
not (F or F and T) or F
not (F or F) or F
not (F) or F
not F or F
T or F =
TRUE
The boolean value resulting from this expression is True.
not (not True or False and True) or False
not (False or False) or False
True or False
True
the Boolean value is True.
We start with the operations between (). not True gives us False. False or False and True gives us False because the and operation requires both values to match and the or operation requires one value to be True. So now we have not (False), which is True. And the final is True or False, which is True.
not (not True or False and True) or False
not (False or False) or False
not (False) or False
True or False
True.
The answer is True. Here is the procedure:
not (not True or False and True) or False
not (False or False and True) or False
not (False or False) or False
not (False) or False
True or False
True
not (not true or false and true) or false
not (false or false and true) or false
not (false or false) or false
not false or false
true or false
true