Question
What is the output of the code shown below?def f(x): def f1(a, b): print("hello") if b==0: print("NO") return return f(a, b) return f1@fdef f(a, b): return a%bf(4,0)
Answer: Option A
Was this answer helpful ?
In the code shown above, we have used a decorator in order to avoid the Zero Division Error. Hence the output of this code is:
hello
NO
Was this answer helpful ?
Submit Solution