human
I am working on the file "Decorators.ipynb".
The first task is:
To avoid this error lets make a decorator to check for this case.
Can you write Python code for it?
assistant
#Here is the Python code you requested.

def smart_divide(func):
    def inner(a,b):
        if b == 0:
            print('Cannot divide by zero')
            return
        return func(a,b)
    return inner

@smart_divide
def divide(a,b):
    return a / b

divide(5,2)

divide(5,0)