Computer Science, asked by recordbreker2005, 1 month ago

Predict the output of this statement. X=40 Y=X+1 X=20 Y=Y+X print(X,Y)
1. 20 40
2. 40 61
3. 20 61
4. 20 41​

Answers

Answered by nimishjagtap02
1

Explanation:

x = 40 ⇒ assigns an initial value of 40 to x. y = x + 1 ⇒ y = 40 + 1 = 41. So y becomes 41. x = 20, y + x ⇒ x = 20, 41 + 40 ⇒ x = 20, 81.

Similar questions