Boolean logic


#1

https://www.codecademy.com/courses/learn-python/lessons/conditionals--control-flow/exercises/this-and-that-or-this-but-not-that?action=resume_content_item

Why is the boolean two equals to True?


#2

Why wouldn’t it be? Please explain your logic so we can see where you wrong


#3

order of operations (not keyword) is resolved first, followed by and and finally or)


#4

False and not True or True
not gets evaluated first

False and False or True
and gets evaluated before or

False and False evaluates to False

False or True
evaluates to True


#5

Thanks !! I understood now :grinning:


#6

I was just doing it in a wrong way
Thanks for explaining :sweat_smile: