0
Please why did my 3rd argument output 2
6 odpowiedzi
+ 3
Maryam Bello lines inside the *if* statement is executed only and only when the condition is true.
Thus "if true" will always pass as the condition is always true.
+ 4
1+1==3 is False and not False is true,so you get 2
+ 4
In your attempts you are writing
>>> if not false
Which is nothing but true so hence "1" is printed and control is never passed to elif/else
+ 3
Maryam Bello just break it line by line
if not True: #which is false so the control goes to elif
print ("1")
elif not (1+1== 3): # (2==3) is false and *not* falso is true hence "2" is printed
print("2")
else:
print("3")
+ 1
Thank you.
So what you mean is
if not false:
which means - if true: will always be passed when in argument?
+ 1