def update_parameters(parameters, grads, learning_rate):
    """
    Using gradient descent to update parameters
    Arguments: parameters is python dictionary containing the parameters
               grads is python dictionary containing gradients and the output of L_model_backward
    Returns: parameters that are updated
    """
    
    L = len(parameters)//2 #number of layers in the neural network
    
    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)]
        
    return(parameters)