Scope
Where in a program a name can be used - names made inside a function are local to it, so functions can't trip over each other's names.
Depth 1 · Foundation
You know that a function's names and parameters exist only during its call, that the same name inside and outside a function are two different names, why assigning to a global inside a function gives UnboundLocalError, and how to pass values in and return them instead.
Sign in to prove what you know with a short quiz, see how deep you've gone, and earn XP for it.
Sign in with GoogleDepths of understanding
- 1
Foundation
You know that a function's names and parameters exist only during its call, that the same name inside and outside a function are two different names, why assigning to a global inside a function gives UnboundLocalError, and how to pass values in and return them instead.
Your path here
What's still between you and Scope, depth 1, in the order you can learn it.
- 1ProgramDepth 1 · Foundation · Program Basics
- 2ExpressionDepth 1 · Foundation · Program Basics
- 3Variables in codeDepth 1 · Foundation · Program Basics
- 4Program stateDepth 1 · Foundation · Program Basics
- 5Input and outputDepth 1 · Foundation · Program Basics
- 6Functions in codeDepth 1 · Foundation · Functions
- 7Return valuesDepth 1 · Foundation · Functions
- 8ScopeDepth 1 · Foundation · Functions
Where it fits
Makes these deeper
Once you know Scope, come back to these — they'll mean more.