code when state retention is the only goal we'll see additional closure use cases laterespecially when exploring decorators in where we'll find the closures are actually preferred to classes in certain roles summary in this we studied one of two key concepts related to functionsscopeswhich determine how variables are looked up when used as we learnedvariables are considered local to the function definitions in which they are assignedunless they are specifically declared to be global or nonlocal we also explored some more advanced scope concepts hereincluding nested function scopes and function attributes finallywe looked at some general design ideassuch as the need to avoid globals and crossfile changes in the next we're going to continue our function tour with the second key function-related conceptargument passing as we'll findarguments are passed into function by assignmentbut python also provides tools that allow functions to be flexible in how items are passed before we move onlet' take this quiz to review the scope concepts we've covered here test your knowledgequiz what is the output of the following codeand whyx 'spamdef func()print(xfunc( what is the output of this codeand whyx 'spamdef func() 'ni!func(print( what does this code printand whyx 'spamdef func() 'niprint(xfunc(print(xtest your knowledgequiz