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)
- A.
2515
- B.
1525
- C.
2525
- D.
25$$15
Attempted by 52 students.
Show answer & explanation
Correct answer: D
Explanation:
Initially,
N = 15Inside
Change(N), value becomes25print(N, end='$$')prints25$$The original
Noutside the function remains15Final
print(N)prints15
So the final output is:
25$$15