Question 30
What will be the output of the following Python code snippet?
def decor(func): def wrapper(x): y=func(x) return x*y return wrapper
@decordef output(x, optional="hello world!"): return x, optional
print(output(5))What will be the output of the following Python code snippet?
def decor(func): def wrapper(x): y=func(x) return x*y return wrapper
@decordef output(x, optional="hello world!"): return x, optional
print(output(5))Correct answer
Question 30 of 32 in the IIT Madras BS Modern Application Development I (MAD 1) End Term paper sat on 3 Sept 2023, in the May 2023 term (IIT M DIPLOMA ET1 EXAM QPD1 S2 03 Sep). It carries 4.5 marks.