+ 1
i dont get this question sololearn asks me, i would like to know why
if not True: print("1") elif not (1 + 1 == 3): print("2") else: print("3")
2 Réponses
+ 2
If not True = False
Elif not (1+1==3) = elif not (False) = True
That Prints 2
+ 1
As Christian said:
The first check (if not True) results as false, so that option doesn't get used.
The second check (elif not(1+1=3)) results as false(false) so becomes true. Runs that option to print 2.
Third option doesn't get checked because second option was used.