CBSE Class 12 Computer Science Question 53 of 103

Working with Functions — Question 11

Back to all questions
11
Question

Question 11

A local variable having the same name as that of a global variable, hides the global variable in its function.

Answer

True

Reason — Inside a function, you assign a value to a name which is already there in a global scope, Python won't use the global scope variable because it is an assignment statement and assignment statement creates a variable by default in current environment. That means a local variable having the same name as that of a global variable, hides the global variable in its function.