def percent_error(prediction, target):
    """
    Return the percent error of a predicted value compared
    to a target value 
    """
    if prediction == target:
        return 0
    else:
        return abs(prediction - target) / max(prediction, target) * 100
