Please explain Boolean not | Sololearn: Learn to code for FREE!


Please explain Boolean not

Python 3

8/13/2019 8:55:41 AM

Ugiomoh Bobby IG

11 Answers

New Answer


It is so simple if the condition given by you is true then Boolean not will invert it and outputs to. False. But if your condition is false then Boolean not will invert it and outputs to True. For ex. a = 5 b = 3 If not (a <b): print ("True") else: print ("False") Now let's have a loot what's happening in the code. The condition. is saying that is. 5<3 which is wrong so if we apply not (5<3) it means 5 is not less than 3 which is correct so our output get's "True"


A boolean value exspresses a truth value which can be either true or false. boolean b = "bobby".equals("bobby"); //output true boolean b2 = "bobby"==new String("bobby"); //output false


Sonic I didn't see the "not" the end of his question earlier 😅


Not is just the negation/negative of the truth value.


Thanks guys


for example if not 1+1==3: Print(23) else: Print(24) This meint that he will be printing 23 because 1+1==3 it is not gleich


The Not operation just inverts True to False and False to True. Say you have two paths, the path on the right is the output, and the path on the left is the input. When you take the left you don't take the right, and vice verca.


Boolean not negates the output value of a Boolean expression


Just remember that answer is always oposite ... 0 stands for false 1 stands for true... shortcut for learning purpose


Boolean simply means true and false that's it


It is the reverse of the normal state not true?=false