9/15 not outcomes dont come first?



<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
bool_four = “not not True or False and not True” = True (answer)

<What do you expect to happen instead?>

shouldnt it be False??? below is my thought process…

“not not” True (=True) or False and “not” True (=False) — “not” first —> True or False and False
True (from not’s) or False “and” False (from not) — “not” outcomes take priority then “and” —>
True and False (=False) or False — then “or” —> False or False = False (my answer, but wrong)

it seems that the “not” outcomes dont take priority, so True or False and False on the first line above would actually “and” False, False equaling False; then “or” True, False equaling True making True (actual answer). I do these in my head and do them at once, but it seems that working the “not” out seems helpful.


Replace this line with your code.

<do not remove the three backticks above>


we can see the evaluation order here:


so first not, then and and finally or

we have:

not not True or False and not True

if we then evaluate all the nots we get:

True or False and False

then and takes priority, False and False is false, so we get:

True or False

which evaluate to true

it seems you don’t prioritize and over or


Hi there!

You evaluate “True or False” to False.

Yet, in the “Hint” for section 09/15 “True or False” are being evaluated to True.

I liked your explanation but your final evaluation confuses me.

Thanks for the help!


you’re right, it should be evaluate to true. I am human, i can make mistakes. Nice catch, thank you :slight_smile:

The fact that you caught the mistake is the ultimate prove you understand it perfectly :slight_smile:


I’m just reliefed that I have finally understood it :slight_smile:

Thanks again for your explanation; it really helped me.


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