def update_parameters(parameters, grads, learning_rate):
    """
    Update parameters using pure gradient descent

    Arguments:
    parameters --  dictionary containing W, b, beta for each layer
    grads --  dictionary containing the gradients.

    Returns:
    parameters -- python dictionary containing the updated parameters
                  parameters["W" + str(l)] = ...
                  parameters["b" + str(l)] = ...
                  parameters["beta" + str(l)] = ...
    """

    L = len(parameters)//3 # number of layers (integer)

    # Update paramters
    for l in range(L):
        parameters['w'+str(l+1)]= parameters['w'+str(l+1)] - learning_rate* grads["dw" + str(l+1)]

        parameters['b'+str(l+1)]= parameters['b'+str(l+1)] - learning_rate* grads["db" + str(l+1)]
        parameters['beta'+str(l+1)] = parameters['beta'+str(l+1)] - learning_rate* grads["dbeta" + str(l+1)]

    return parameters