# Bool_four

#1

I have experimented in the lab and worked out that both my statements are true, but CodeAcademy is not accepting it. Any help, please?

#2

#3

Here is the code you requested:

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

The exercise is number 6 And under the heading Conditionals and Control Flow. I think it is part of the 3rd lesson.

Thanks very much for offering to help.

Rosemary

#4

The `is` operator tests if two objects are the same.

example:

``````[] is [] # False
``````

Donâ€™t use it here, youâ€™ll know how to use it if and when you need it (wonâ€™t need it in the Python track here at the very least)

#5

in your statement 20 - 10 * 2 this equals 0 so it is not grater then. try less then and it should work. The interpreter sees this statement as 20 - 20 = 0 is less then or equal to 10% 10 = 1. Do you see it now? hope this helps

#6

The statement 10 % 10 <= 20 - 10 * 2 is given in the exercise so I donâ€™t think Iâ€™m expected to change it.

However I do agree with you that 20 - 10 * 2 = 0, also 10 % 10 = 0, so either greater than and equal to OR less than and equal to should work. Being desperate I did change it to less than or equal to, though, and it didnâ€™t work.

Iâ€™ve since moved on to some of the other lessons and I seem to be ok with them. I would still like to resolve this puzzle if I can, though. Thanks again.

#7

All the other expressions worked with is True or is False, gaurangtandon. Thanks for your help, though.

#8

Seems bugged to me. You basically copy the text â€ś-(12) < 20 and 10 % 10 <= 20 - 10 * 2â€ť and you decide whether it â€śis Trueâ€ť or â€śis Falseâ€ť. Neither of those work, so I think itâ€™s bugged. Iâ€™m having the same problem. Unless weâ€™re overlooking an instruction somewhere.

#9

Dear @chiprockstar10213 and @bluecity_uk, as @ionatan explained earlier, you do not need to use the `is` operator at all, itâ€™s something which the exercise isnâ€™t expecting. You just need to assign literal boolean values (`True` or `False`) to the five variables.

#10

Passing the exercise isnâ€™t necessarily the same as having done it correctly.
`is` returns `True` or `False` soâ€¦ thereâ€™s a 50% chance to get the right one huh?

The instructions are to assign â€śthe result of some boolean expressionâ€ť and the result of a boolean expression is a bool:

``bool_fifteen = True``

#11

I got the answer right. Since only True AND True condition gives True, and that is what you got after solving the problem, your answer should simply be bool_four = True

#12

bool_four = -1 < 1 and 0 <= 0 is True