what is scope of variable. define global and local variable?
Answers
Answered by
2
Scope of variable:- The part of a program where variable is accessible can be define as the scope of that variable.
Global variable:- In python a variable that is defined outside any function or any block is known as a global variable.
Local variable :- A variable that is defined inside any function or a block is known as a local variable.
Similar questions
India Languages,
17 days ago
India Languages,
17 days ago
Math,
17 days ago
Math,
1 month ago
Social Sciences,
1 month ago
Hindi,
9 months ago
Social Sciences,
9 months ago