English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write the rules of a local variable. - Computer Science

Advertisements
Advertisements

Question

Write the rules of a local variable.

Short Note

Solution

Rules of local variable:

  1. A variable with a local scope can be accessed only within the function/block that it is created in.
  2. When a variable is created inside the function/block, the variable becomes local to it.
  3. A local variable only exists while the function is executing.
  4. The formate arguments are also local to function.
shaalaa.com
Variable Scope
  Is there an error in this question or solution?
Chapter 7: Python functions - Evaluation [Page 113]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 7 Python functions
Evaluation | Q 1. | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×