Condition


#1

I'm stuck on this one too, but I think it might be something wrong with the page. here is my code:

bool_one = False and False is True

bool_two = -(-(-(-2))) == -2 and 4 >= 16**0.5 is False

bool_three = 19 % 4 != 300/10/10/10 and False is True

bool_four = -(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2 is True

bool_five = True and True is True

when I save and submit, it tells me to double check the value for bool_four, but the math works out:

-(1**2) < 2**0 is equal to -1 < 1
10 % 10 <= 20 - 10 * 2 is equal to 0 <= 0

Both of those statements are True, with the "and" the total line should be True, but the page tells me bool_four is incorrect. So I changed it to False to test and it still tells me that bool_four is not correct. What am I missing on this?

The exercise link is:
https://www.codecademy.com/courses/python-beginner-BxUFN/2/2?curriculum_id=4f89dab3d788890003000096#


-(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2 ----> True and False should be False
#2

you should manually evaluate the conditions, and then set bool_one, two and so on to either True or False. example:

bool_one = False

#4

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