+ 1

Why the different answer 🤔

x=3 x*=4+5 print (x) x=3 x=x*4+5 print (x)

31st May 2020, 10:09 AM
Prince Rupam 🎶
Prince Rupam 🎶 - avatar
3 Respostas
+ 6
You can remember one simple rule: What's right from the = (no matter if simple = or += etc) is evaluated first! x *= (4+5) means x *= 9 x = (x*4+5) means x = (12+5)
31st May 2020, 10:26 AM
HonFu
HonFu - avatar
31st May 2020, 10:10 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar