+ 1
Why the different answer 🤔
x=3 x*=4+5 print (x) x=3 x=x*4+5 print (x)
3 Respuestas
+ 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)
+ 5
Check this thread out:
https://www.sololearn.com/discuss/1251023/?ref=app
And the illustrative code:
https://code.sololearn.com/c6U6nrEn3DR0/?ref=app