a=5 b=10 a+=a+b b*=a+b print (a, b) in python
Answers
Answered by
41
Source code:
>>> a = 5
>>> b = 10
>>> a += a + b
>>> b *= a + b
>>> print (a, b)
Output:
20 300
Explanation:
- a += a + b
We know that a = 5 and b = 10. Here, a takes the value of a + (a + b), which is 5 + 5 + 10 = 20. Hence, a's final value will be 20.
- b *= a + b
b's value is still 10, and a's value has been changed to 20. Hence b's new value will be b * (a + b), which is 10 * (20 + 10) = 300.
Answered by
0
Answer:
above answer is correct I can't explain the question
Similar questions