0
What is mean boolens?
i m fully new
2 Answers
0
booleans are concept taken from boolean algebra( more about it here https://en.wikipedia.org/wiki/Boolean_algebra ) and they represent data type which can contain only values true or false. you cannot do addition or subtraction with them because it does not make much sense, but you can use operations like and , or, not. for example, if variable a has value true, not a will give false. a and b will give true only if both a and b are true and will give false in all other situations. common places where you will use booleans are if statements. for example:
if a == b:
print("stuff")
uses boolean type for condition since a==b will return true or false (depending on values of a and b). you can find some information about booleans in python here http://learnpythonthehardway.org/book/ex27.html
0
boolean belongs to Logical values,
only two logical values they are
true, false in python terms and in computer or physics terms they can be 1, 0 which used in also logic gates like
AND, OR, NOT etc