Learning And


#1



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


In the exercise, they asked me to configure out whether this condition is true or false:
(-(-(-2))) == -2 and 4 >= 16**0.5
and i configured out that it is true.

Then, when i click Save and Submit Code, it comes up with an error message which says that i should check my answer. Is my answer wrong, or...

Please note if something is wrong with my answer!


#2

please copy paste your code to the forum so we can have a look


#3

Ok. This is the whole exercise:

Instructions:
Let's practice with and. Assign each variable to the appropriate boolean value.

Set bool_one equal to the result of False and False
Set bool_two equal to the result of -(-(-(-2))) == -2 and 4 >= 16^0.5
Set bool_three equal to the result of 19 % 4 != 300 / 10 / 10 and False
Set bool_four equal to the result of -(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2
Set bool_five equal to the result of True and True

Answer (Code):

bool_one = False

bool_two = True

bool_three = False

bool_four = False

bool_five = True

Error Message:

Oops, try again. Double check your value for bool_two!


#4

but bool_two is False, -(-(-(-2))) is 2, and 2 == -2 is False, so then we have:

False and True

which is False


#5

Oh thank you. I saw it as if there were only two parantheses :yum:


#6

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