Question
What is the output of the code shown below?def d(f): def n(*args): return '$' + str(f(*args)) return n@ddef p(a, t): return a + a*t print(p(100,0))
Answer: Option B
Was this answer helpful ?
In the code shown above, the decorator helps us to prefix the dollar sign along with the value. Since the second argument is zero, the output of the code is: $100.
Was this answer helpful ?
Submit Solution