Computer Science, asked by mary5850, 5 hours ago

predict the output
a) x= 40
y= x+ 1
x= 20, y+ x
print ( x, y)​

Answers

Answered by rishika4466
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