Question 5
Consider the following Python code snippet, and select the correct output list if the code is run on the terminal.
def modify(func): def wrapper(l): res = func(l) return res[::-1] return wrapper
def update(func): def wrapper(l): res = func(l) return list(map(lambda x: x/2,res)) return wrapper
@modify@updatedef mylist(l): out_list = [] for i in l: out_list.append(i**2) return out_list
print(mylist([2,4,1,7,5,9]))[0.25, 1, 4, 6.26, 12.25, 20.25]
[1, 4, 0.25, 12.25, 6.25, 20.25]
[40.5, 12.5, 24.5, 0.5, 8.0, 2.0]
[0.5, 2.0, 8.0, 12.5, 24.5, 40.5]