Why are my boolean values not accepted?

Question

Why are my boolean values not accepted?

Answer

Some common issues to keep in mind are:
Boolean values in Python do not have quotes around them. They are True and False, not true, false, ”True”, or ”False”, or any other combination.
Keep an eye out for <= or >= because the result will be True if both sides are equal OR greater or lesser (depending on the symbol).
Let’s take a look at an example:

# Set this to True if 1000 != (20 + 22) or to False otherwise.
bool_googol = 

The result stored in bool_googol will be True, because 1000 is definitely not equal to 42.

4 Likes

Set bool_four equal to the result of -22 >= -18
why is the answer False ?
i thought it to be True because -22 is > -18 but not = -18

Hi @object0125451485,

In math, -22 is less than -18. Since -22 >= -18 shows it to be greater or equal to -18, it is false.

2 Likes