+ 1

if 6 == 6 :; print("True")

why... ? if 1+1*3 == 6: ; print("True")

29th Jul 2016, 12:06 AM
Miguel Lora
Miguel Lora - avatar
4 Respuestas
+ 1
First it will perform multiplication 1*3 i.e,3 Next it will perform addition 1+3 i.e,4 Now it will check the condition if 4 is equal to 6 as its not true it will skip the if statements and goes to else part
29th Jul 2016, 3:17 AM
nikitha gireddy
nikitha gireddy - avatar
+ 1
if (1+1)*3==6:; print("True")
23rd Aug 2016, 10:55 PM
Juan Federico Martinez
Juan Federico Martinez - avatar
0
* has more precedence then + 1*3=3 3+1=4 4!=6(doesn't enter if loop)
2nd Aug 2016, 5:29 PM
Vijayalaxmi maigur
Vijayalaxmi maigur - avatar
0
OK, I got it!
23rd Aug 2016, 11:05 PM
Miguel Lora
Miguel Lora - avatar