+ 2
abour boolean logic "not"
why yhe first line of this code is "if not true"??where's the condition?? what's the objective of 'not Ture'? question&codes: What is the result of this code? if not True: print("1") elif not (1 + 1 == 3): print("2") else: print("3")
2 ответов
0
a condition evaluates to True or False.
True directly evaluates to True.
0
not True = False. So statement inside if condition will not be executed. 2==3 gives False. not False = True. So statement inside elif will be executed.