Consider the statements given below and then choose the correct output from…

2025

Consider the statements given below and then choose the correct output from the given options:

def Change (N):
N = N + 10
print(N, end = '$$')
N = 15
Change(N)
print(N)

  1. A.

    2515

  2. B.

    1525

  3. C.

    2525

  4. D.

    25$$15

Attempted by 52 students.

Show answer & explanation

Correct answer: D

Explanation:

  • Initially, N = 15

  • Inside Change(N), value becomes 25

  • print(N, end='$$') prints 25$$

  • The original N outside the function remains 15

  • Final print(N) prints 15

So the final output is:

25$$15

Explore the full course: Bpsc