Baheeg Training and Test Exam

Python Advanced level

Score: 0 / 0 answered

Progress: 0 of 815 qs

time elap: 00:00

Question 1: What is the output of the following code?

def decorator(func):
    def wrapper(*args, **kwargs):
        print("Before function call")
        result = func(*args, **kwargs)
        print("After function call")
        return result
    return wrapper

@decorator
def add(a, b):
    return a + b

print(add(2, 3))