Baheeg Training and Test Exam

Python intermediate Level

Score: 0 / 0 answered

Progress: 0 of 817 qs

time elap: 00:00

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

def repeat(num):
    def decorator(func):
        def wrapper(*args, **kwargs):
            for _ in range(num):
                func(*args, **kwargs)
        return wrapper
    return decorator

@repeat(3)
def say_hi():
    print("Hi!")

say_hi()