def hello_decorator(func):
    # inner1 is a Wrapper function in
    # which the argument is called

    # inner function can access the outer local
    # functions like in this case "func"
    def inner1():
        print("Hello, this is before function execution")

        # calling the actual function now
        # inside the wrapper function.
        func()

        print("This is after function execution")

    return inner1

# defining a function, to be called inside wrapper
def function_to_be_used():
    print("This is inside the function !!")

    # passing 'function_to_be_used' inside the
    # decorator to control its behavior


function_to_be_used = hello_decorator(function_to_be_used)

# calling the function
function_to_be_used()

import time

def timeis(func):
    '''Decorator that reports the execution time.'''

    def wrap(*args,**kwargs):
        start = time.time()
        result = func(*args,**kwargs)
        end = time.time()

        print(func.__name__,end-start)
        return result

    return wrap

@timeis
def countdown(n):
    '''Counts down.'''
    while n > 0:
        n -= 1

countdown(5)
countdown(1000)
7be1d8c96b4ba96d4a30e8c0d8fba923f030fbb0
def hello_decorator(func):

    def inner1():
        print('Hello, this is before function execution')
        func()
        print('This is after function execution')
    return inner1


def function_to_be_used():
    print('This is inside the function !!')


<mask token>


def timeis(func):
    """Decorator that reports the execution time."""

    def wrap(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        end = time.time()
        print(func.__name__, end - start)
        return result
    return wrap


@timeis
def countdown(n):
    """Counts down."""
    while n > 0:
        n -= 1


<mask token>

def hello_decorator(func):

    def inner1():
        print('Hello, this is before function execution')
        func()
        print('This is after function execution')
    return inner1


def function_to_be_used():
    print('This is inside the function !!')


<mask token>
function_to_be_used()
<mask token>


def timeis(func):
    """Decorator that reports the execution time."""

    def wrap(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        end = time.time()
        print(func.__name__, end - start)
        return result
    return wrap


@timeis
def countdown(n):
    """Counts down."""
    while n > 0:
        n -= 1


countdown(5)
countdown(1000)

def hello_decorator(func):

    def inner1():
        print('Hello, this is before function execution')
        func()
        print('This is after function execution')
    return inner1


def function_to_be_used():
    print('This is inside the function !!')


function_to_be_used = hello_decorator(function_to_be_used)
function_to_be_used()
<mask token>


def timeis(func):
    """Decorator that reports the execution time."""

    def wrap(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        end = time.time()
        print(func.__name__, end - start)
        return result
    return wrap


@timeis
def countdown(n):
    """Counts down."""
    while n > 0:
        n -= 1


countdown(5)
countdown(1000)

def hello_decorator(func):

    def inner1():
        print('Hello, this is before function execution')
        func()
        print('This is after function execution')
    return inner1


def function_to_be_used():
    print('This is inside the function !!')


function_to_be_used = hello_decorator(function_to_be_used)
function_to_be_used()
import time


def timeis(func):
    """Decorator that reports the execution time."""

    def wrap(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        end = time.time()
        print(func.__name__, end - start)
        return result
    return wrap


@timeis
def countdown(n):
    """Counts down."""
    while n > 0:
        n -= 1


countdown(5)
countdown(1000)

def hello_decorator(func):
    # inner1 is a Wrapper function in
    # which the argument is called

    # inner function can access the outer local
    # functions like in this case "func"
    def inner1():
        print("Hello, this is before function execution")

        # calling the actual function now
        # inside the wrapper function.
        func()

        print("This is after function execution")

    return inner1

# defining a function, to be called inside wrapper
def function_to_be_used():
    print("This is inside the function !!")

    # passing 'function_to_be_used' inside the
    # decorator to control its behavior


function_to_be_used = hello_decorator(function_to_be_used)

# calling the function
function_to_be_used()

import time

def timeis(func):
    '''Decorator that reports the execution time.'''

    def wrap(*args,**kwargs):
        start = time.time()
        result = func(*args,**kwargs)
        end = time.time()

        print(func.__name__,end-start)
        return result

    return wrap

@timeis
def countdown(n):
    '''Counts down.'''
    while n > 0:
        n -= 1

countdown(5)
countdown(1000)