Consider the following Python code. X, Y = 5, 7 def FUN(Y=10): global X X -= Y…

PYQ EMRS TGT/PGT (ESSE) 2025

Consider the following Python code.
X, Y = 5, 7
def FUN(Y=10):
global X
X -= Y
Y += X
print(X, Y, end=' ')
FUN(X)
print(Y)
Which of the following is the correct output of this program?

  1. A.

    -2 3 7

  2. B.

    0 5 7

  3. C.

    -5 5 7

  4. D.

    3 -2 7

Attempted by 694 students.

Sign up free to check your answer

Sign up free

Explore the full course: Emrs Cs Tier 2

Loading lesson…