Examveda

What will be the output of the following Python code?
def f(x):
    def f1(a, b):
        print("hello")
        if b==0:
            print("NO")
            return
        return f(a, b)
    return f1
@f
def f(a, b):
    return a%b
f(4,0)

A. hello
NO

B. hello
Zero Division Error

C. NO

D. hello

Answer: Option A


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators