Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. A variable declared inside a function cannot be used outside it.
Reason. A variable created inside a function has a function scope.
Python Functions
1 Like
Answer
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
Variables declared inside a function are typically local to that function, meaning they exist only within the scope of the function and they can only be accessed and used within the function in which they are declared.
Answered By
1 Like