Please can you take a look and tell me why this is true and not false?


#1

What did i get wrong?

Set bool_four equal to the result of
-(1 ** 2) < 2 ** 0 and 10 % 10 <= 20 - 10 * 2 My answer: bool_four = False

But it says to doublecheck. Pls help!


#2

(-1 ** 2) results in: -1
2 ** 0 result in: 1

-1 < 1 is True. Does this one make sense?

then on the other side of the and operator we have:

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

True and True results in True

which step are you struggling?


#3

Thanks a lot. I mixed up 10**2 with 10*2. Now i get it. :):grin:


#4

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