Examveda

What will be the output of the following Python code?
def d(f):
    def n(*args):
        return '$' + str(f(*args))
    return n
@d
def p(a, t):
    return a + a*t 
print(p(100,0))

A. 100

B. $100

C. $0

D. 0

Answer: Option B


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators