Explanation: in the code shown above, when we call the function f, a new namespace is created. the assignment x=4 is performed in the local namespace and does not affect the global namespace. hence the output is 1.
Q. f() x
β
Correct Answer: (D)
1
Explanation by: Mr. Dubey
in the code shown above, when we call the function f, a new namespace is created. the assignment x=4 is performed in the local namespace and does not affect the global namespace. hence the output is 1.
Discussion
Question Analytics
516
Total Visits
2 y ago
Published
Mr. Dubey
Publisher
83%
Success Rate