predict the output
a) x= 40
y= x+ 1
x= 20, y+ x
print ( x, y)
Answers
Answered by
1
Answer:
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.
Answered by
3
Answer:
- 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. This makes x a Tuple of 2 elements (20, 81).
- print (x, y) ⇒ prints the tuple x and the integer variable y as (20, 81) and 41 respectively.
Explanation:
Hi army (^∇^)ノ
would you like to be my friend
Attachments:
Similar questions