9/15 bool_two = True? How?


#1

I don understand how the outcome is true?

My reasoning:
False and not True or True
=
False and False or True -> in an And statement both before and after "And" need to be true; False or True = true, but the other before "And" is false so why is False not the right answer?


#2

Ho @jt1 ,

According to the precedence rules, the operators are applied in the following order, unless parentheses are used to alter that order ...

  • not
  • and
  • or

So, evaluating this in steps, we have ...

- False and not True or True

- False and False or True

- False or True

- True

#3

Right, I get it. Thanks!