Vidyalelo
Python · Q19

Formatting and Decorators

Programming · Python · question 19

Q19

What will be the output of the following Python code? def mk(x): def mk1(): print("Decorated") x() return mk1 def mk2(): print("Ordinary") p = mk(mk2) p()

A.
Decorated
Decorated
B.
Ordinary
Ordinary
C.
Ordinary
Decorated
D.
Decorated
Ordinary
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board