Open In App

Python | Namespaces and Scope Quiz | Question 7

What is the output of the following code?

x = 10



def func():
   x = 5
   print(x)

func()
print(x)



(A)

10

(B)

5

(C)

 15

(D)

Error

Answer: (B)
Explanation:
Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :
Uncategorized