Quiz on Using Decorators to Improve Our Code
Test your understanding of using decorators to improve code.
1
What is the purpose of decorators?
A)
They are a mechanism that allows us to specify data types for variables in Python.
B)
They are a mechanism to simplify the way functions and classes are defined when they have to be modified after their original definition.
C)
They are a mechanism that allows us to overwrite function definitions in specific scenarios.
D)
They are a mechanism that allows us to enforce data returned by a function is of a specific data type.
Question 1 of 50 attempted
Get hands-on with 1200+ tech skills courses.