- 3
Still not get it. Anybody help me??
3 Réponses
+ 3
you need to tell us what your problem is
0
which part you don't understand?
be a bit more specific
0
I'm going to assume you mean you don't understand Boolean values in general, since you didn't specify any exact issue. There are only two boolean values, True or False. A statement can either be true, or it can be false. In Python, we test with == (Whereas = is assignment). If you go into IDLE and type 5 == 5, you're testing whether or not 5 is equal to 5, which it of course is, so the console will return True.
If you type 4 == 5, it will return False, because 4 is not equal to 5. You can use boolean logic and conditional statements to test whether a condition is True or False, and run various procedures depending on the outcome.
This all goes back to the birth of computer science. 0 is Off, or False, and 1 is On, or True. Binary itself is nothing more than a series of On or Off switches.