Conditionals & Control Flow


#1


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

On Conditionals and Control Flow part 7(Or). It has me set bool_three equal to the result of 100**0.5 >= 50 or False. Both of the variables are False yet the only way I can pass this section is if i answer True. Seems to be a bug


bool_one = 2**3 == 108 % 100 or 'Cleese' == 'King Arthur' is True 

bool_two = True or False is True

bool_three = 100**0.5 >= 50 or False is True

bool_four = True or True is True

bool_five = 1**100 == 100**1 or 3 * 2 * 1 != 3 + 2 + 1 is False


#2

You should not be using the is-operator, no bug here.

bool_fourty_seven = True

#3

But how is 100**.5 >= 50 or False a True statement? Both variables are false


#4

Oh I get it. I don't need to include all the variables in my own code just the answers.


#5

There are no variables in that expression unless you count True/False which I suppose you could because they can be assigned to. The whole thing is an expression; an expression can be multiple expressions combined by operators.

It does not evaluate to True, your confusion is likely related to the is-operator. If you did "False is False " then that expression is indeed True because False is indeed False, not just equal, but IS, it's the same value, same object, that is what is tests and that's not related to anything in this exercise.