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
Math,
19 hours ago
Math,
19 hours ago
History,
19 hours ago
Math,
1 day ago
Social Sciences,
1 day ago
Hindi,
8 months ago
Social Sciences,
8 months ago