Please help me with bool_4 of this exercise! I think the computer is wrong


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/2/5?curriculum_id=4f89dab3d788890003000096#


bool_4 should be false but it tells me that answer is true


I expect the answer the answer to be true.


Replace this line with your code. 
It says "Set bool_four equal to the result of not not True or False and not True" and when I put that down as False, it said that was wrong and that true is right. Please help!!!


#2

The answer becomes much clearer once you break it down:
(I will be following the order of operations, which is not, and, then or)
1)Original Statement: not not True or False and not True
not True returns False, so you would replace the italicized sections with False, giving you...
2) not False or False and False
not False then returns True, so you would replace the italicized section with True:
3) True or False and False
False and False returns False, so the equation is reduced to:
4)True or False
or returns True if either of the arguments is True, so this entire line returns True.


#3

Thank you! I didn't know there was an order of operations.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.