πŸ“Š Problem Solving and Python Programming
Q. f() x
  • (A) error
  • (B) 4
  • (C) junk value
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1

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.


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