6 And "Double check your value for bool_four"


#1

What am I doing wrong??

bool_one = False and False is False

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

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

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

bool_five = True and True is True

It keeps saying "double check your value for bool_four". I've changed everything I could and nothing works.


#2

I am not sure the math is correct on this one but, to go on the "correct" line for bool_four is

bool_four = True and True

Best of luck!


#3

I don't understand what you are saying. If you got the correct answer please copy and paste it here.


#4

The correct answer is
bool_four = True and True is True
if you have any more trouble reply


#5

This is correct.

bool_one = False and False is False

bool_two = True and False is False

bool_three = True and True is True

bool_four = True and True is True

bool_five = False and False is False


#6

Hi,
just to go ahead I had to answer that bool_four was True (Nov 23rd, 2015, 19:30 GMT)

Though I think it is not.

Let's see:
-(1**2) < 2**0 is -1 < 1 which is True
but
10%10 <= 20 -10*2 becomes 0 <= -80 which is False
(modulus of 10 in 10 is zero, and 10 to the power of two evaluates before substraction from 20)

So the "and" evaluates to False, might be a confusion?


#7

Where are you getting this from?

For example, if my bool_five clearly states "True and True" where are you getting "False and False" for your bool_five statement?

Or if my bool_three statement is "19 % 4 != 300 / 10 / 10 and False" why is your bool_three "True and True"?


#8

"10 * 2" is ten multiplied by 2 not "10**2" or ten squared.

"10 % 10 <= 20 - 10 * 2" is 0 <= 0 which is True.


#9

Can you copy and paste, verbatim, the entire code that was accepted for you? With the numerical statements. I know bool_four is true, but it is not accepting my answer.


#10

I finally got it. Why does it require us to type the words "True and True" when it clearly states "Set bool_four equal to the result of -(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2" ??? This is silly.

So instead of coding:

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

It forces me to code:

"bool_four = True and True is True" in order to be accepted.

The weird thing is I didn't have to change my other answers to fit that formula. My bool_two (bool_two = -(-(-(-2))) == -2 and 4 >= 16**0.5 is False) was accepted as is.

I spent nearly two days on this silly problem.

Thanks everyone for your help.


#11

You were right the first time. I just couldn't (still can't) wrap my mind around changing the variables to words. Usually when the the statement is highlighted in a gray box, it wants you to code that verbatim, but somehow this one bool went rogue on me.


#12

Thanks!!!!!! :smiley: It's was driving me crazy haha


#13

Thank you everyone! This was driving me nuts!


#14

Thank you very much!


#15

Just to clear things up....

Here is the code that will solve this lesson

bool_one = False and False

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

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

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

bool_five = True and True

       -Coder242

#16

Shouldn't 4 >= 16**0.5 be true? Is that just saying 4 is greater or equal to 4?


#17

They make it very simple by telling you exactly what to code. But really with that Hint? Doing the math to these and checking the Hint after reaching error only made my head spin.