Discussion :: Python MCQs
-
What is the output of the code shown below?def f(x):def f1(a, b):print("hello")if b==0:print("NO")returnreturn f(a, b)return f1@fdef f(a, b):return a%bf(4,0)
Answer : Option A
Explanation :
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
Be The First To Comment