🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Decorators: all 10 questions

Quiz: Python Decorators · Question 7 of 10

How many nested functions does a decorator with arguments, like @repeat(3), usually have?

How many nested functions does a decorator with arguments, like @repeat(3), usually have?

  1. A.One
  2. B.Two
  3. C.Three
  4. D.Four
Answer & explanation

Correct answer: Three

repeat(times) returns decorator(func), which returns wrapper.

Can you get the rest right without peeking?

Take the timed Quiz: Python Decorators quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →