QuestionQ107

VerifiedFunctions and Exceptions

What is the expected output from the following code?

Question Image

Explanation

x is a global variable with the value 1. Calling func() prints x + 1, which is 2, and the final print(x) outputs 1.

Community Discussion

No comments yet. Be the first to start the discussion!