Pls can anyone better explain this to me


#1

This and That (or This, But Not That!)
Boolean operators aren't just evaluated from left to right. Just like with arithmetic operators, there's an order of operations for boolean operators:

not is evaluated first;
and is evaluated next;
or is evaluated last.
For example, True or not False and False returns True.

pls can anyone better explain this to me

Assign True or False as appropriate for bool_one through bool_five.

Set bool_one equal to the result of False or not True and True
Set bool_two equal to the result of False and not True or True
Set bool_three equal to the result of True and not (False or False)
Set bool_four equal to the result of not not True or False and not True
Set bool_five equal to the result of False or not (True and True)


#2

lets do bool_one, manually evaluate False or not True and True, if this condition is True, set bool_one to true:

bool_one = True

otherwise, the condition is false, so set bool_one to false:

bool_one = False

#3

oh this is a good explanation but how di knw if the condition is True or False. thank u


#4

walk me through how you think you should evaluate this condition, so i can see where you are struggling/going wrong


#5

here is the link...
https://www.codecademy.com/courses/python-beginner-BxUFN/2/5?curriculum_id=4f89dab3d788890003000096#
wht i really dont understand is that concept of


#6

well, just like with math where we have order of operations (root and square first, then multiplying and division and last sum and subtract), we have the same with booleans, they are also evaluated in a specific order, not from left to right


#7

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