def tempInRange( temp, threshold, percent ):
    """
    Check if temperature is within threshold; check for above/below
    threshod depending on percent
    :param temp: float/decimal
    :param threshold: float/decimal
    :param percent: float/decimal
    :return: boolean
    """

    if percent < .50:
        if temp < threshold:
            return True
        else:
            return False

    if percent >= .50:
        if temp > threshold:
            return True
        else:
            return False