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

+3

Please explain Boolean not

Python 3

8/13/2019 8:55:41 AM

Ugiomoh Bobby IG

11 Answers

New Answer

+10

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"

+6

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

+5

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

+4

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

+3

Thanks guys

+3

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

+2

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.

+2

Boolean not negates the output value of a Boolean expression

+1

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

+1

Boolean simply means true and false that's it

+1

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