1. What is decorator ? Junior A. a callable that wraps another function to extend its behavior, applied with @ syntax above the definition B. a nested function that captures and remembers variables from its enclosing scope after that scope has returned C. a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it D. a method that receives the class itself as its implicit first argument rather than an instance Reveal the answer + AI explanation — free account
2. Which term means: "a callable that wraps another function to extend its behavior, applied with @ syntax above the definition"? Junior A. closure B. staticmethod C. decorator D. classmethod Reveal the answer + AI explanation — free account
3. Which statement is correct? Junior A. decorator — a callable that wraps another function to extend its behavior, applied with @ syntax above the definition B. decorator — a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it C. decorator — a method bound to neither the instance nor the class, receiving no implicit first argument D. decorator — a nested function that captures and remembers variables from its enclosing scope after that scope has returned Reveal the answer + AI explanation — free account
4. What is closure ? Mid A. a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it B. a method that receives the class itself as its implicit first argument rather than an instance C. a method bound to neither the instance nor the class, receiving no implicit first argument D. a nested function that captures and remembers variables from its enclosing scope after that scope has returned Reveal the answer + AI explanation — free account
5. Which term means: "a nested function that captures and remembers variables from its enclosing scope after that scope has returned"? Mid A. staticmethod B. functools.wraps C. classmethod D. closure Reveal the answer + AI explanation — free account
6. Which statement is correct? Mid A. closure — a method bound to neither the instance nor the class, receiving no implicit first argument B. closure — a callable that wraps another function to extend its behavior, applied with @ syntax above the definition C. closure — a nested function that captures and remembers variables from its enclosing scope after that scope has returned D. closure — a method that receives the class itself as its implicit first argument rather than an instance Reveal the answer + AI explanation — free account
7. What is functools.wraps ? Mid A. a method that receives the class itself as its implicit first argument rather than an instance B. a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it C. a nested function that captures and remembers variables from its enclosing scope after that scope has returned D. a method bound to neither the instance nor the class, receiving no implicit first argument Reveal the answer + AI explanation — free account
8. Which term means: "a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it"? Mid A. closure B. functools.wraps C. decorator D. staticmethod Reveal the answer + AI explanation — free account
9. Which statement is correct? Mid A. functools.wraps — a method that receives the class itself as its implicit first argument rather than an instance B. functools.wraps — a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it C. functools.wraps — a nested function that captures and remembers variables from its enclosing scope after that scope has returned D. functools.wraps — a callable that wraps another function to extend its behavior, applied with @ syntax above the definition Reveal the answer + AI explanation — free account
10. What is staticmethod ? Senior A. a nested function that captures and remembers variables from its enclosing scope after that scope has returned B. a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it C. a callable that wraps another function to extend its behavior, applied with @ syntax above the definition D. a method bound to neither the instance nor the class, receiving no implicit first argument Reveal the answer + AI explanation — free account
11. Which term means: "a method bound to neither the instance nor the class, receiving no implicit first argument"? Senior A. functools.wraps B. classmethod C. decorator D. staticmethod Reveal the answer + AI explanation — free account
12. Which statement is correct? Senior A. staticmethod — a callable that wraps another function to extend its behavior, applied with @ syntax above the definition B. staticmethod — a method bound to neither the instance nor the class, receiving no implicit first argument C. staticmethod — a method that receives the class itself as its implicit first argument rather than an instance D. staticmethod — a nested function that captures and remembers variables from its enclosing scope after that scope has returned Reveal the answer + AI explanation — free account
13. What is classmethod ? Senior A. a nested function that captures and remembers variables from its enclosing scope after that scope has returned B. a method that receives the class itself as its implicit first argument rather than an instance C. a helper applied to a wrapper to copy the original function's name, docstring, and metadata onto it D. a method bound to neither the instance nor the class, receiving no implicit first argument Reveal the answer + AI explanation — free account
14. Which term means: "a method that receives the class itself as its implicit first argument rather than an instance"? Senior A. decorator B. classmethod C. closure D. staticmethod Reveal the answer + AI explanation — free account
15. Which statement is correct? Senior A. classmethod — a callable that wraps another function to extend its behavior, applied with @ syntax above the definition B. classmethod — a method that receives the class itself as its implicit first argument rather than an instance C. classmethod — a method bound to neither the instance nor the class, receiving no implicit first argument D. classmethod — a nested function that captures and remembers variables from its enclosing scope after that scope has returned Reveal the answer + AI explanation — free account