+ 1
am a bit confused about this operator precedence
1+1*3==6 according to the order or precedence + comes before * Then (1+1)*3==6 2*3==6 6==6 Then the result would have been Print("yes") But thats not it Pls someone help me out
2 Respostas
+ 2
What we are talking about? Python?
Python's order of operations is the same as that of normal mathematics: parentheses first, then exponentiation, then multiplication/division, and then addition/subtraction.
But how ever, NEVER comes + before *
In none languages in the world.
So in this case multiplication first.
1*3 =3
1+3 =4
4 != 6
0
ok thanks, I thought I saw that on the table