Sail E0 Webinar
Question
What is the output of the code shown below?def mk(x):    def mk1():        print("Decorated")        x()    return mk1def mk2():    print("Ordinary")p = mk(mk2)p()
Options:
A .  DecoratedDecorated
B .  OrdinaryOrdinary
C .  OrdinaryDecorated
D .  DecoratedOrdinary
Answer: Option D


The code shown above first prints the word "Decorated and then "ordinary. Hence the output of this code is: Decorated 
Ordinary



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers