Skip to Content
Python Advanced: Code That Scales Past Your Own Laptop
Advanced
0 likes
Courses
Python Advanced: Code That Scales Past Your Own Laptop

Check Yourself: Functions That Wrap Functions

Five scenario questions on closures and decorators. If you miss more than one, reread the two lessons before moving on.

Course content

Sign in to save your progress.

Course Home
1. make_vat(rate) returns an inner function that uses rate. After make_vat has finished, how does the inner function still know the rate?
2. Your counter's inner function does count += 1 and fails with UnboundLocalError. What is the fix?
4. You decorate fetch_rates with your own decorator. Logs and test reports now call it "wrapper". What did you forget?

About

Five scenario questions on closures and decorators. If you miss more than one, reread the two lessons before moving on.

Duration
5 min
Last update
09/01/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.