Why is it asking me to check the value of one of my booleans?


#1

##Question
Why is it asking me to check the value of one of my booleans?

Answer

If you see a red error message saying something about the value of your booleans, be sure that your expressions are actually equal to the answer you expect!
It may help to print out your entire expression to see what it’s evaluating to if you think it’s equal to what’s being asked for. Take a look at the example below of printing an expression result:

# Make me false!
bool_false = not True or 10 >= 9
print bool_false

We see that it prints True to the console on the right! Now we can go back and revise our expression to make it false.
Keep this in mind for future lessons if you get stuck and feel your code is correct, as printing is often a very helpful debugging tool!


FAQ: Learn Python - Conditionals & Control Flow - Mix 'n' Match