Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
628 B
2
Indexable
Never
        mil_median = self.MODEL_MIL_MEDIANS['level-one'].get(
            car_make, {}
        ).get(
            car_model
        )
        if mil_median is not None:
            result = pred_price * (mil_median / milage) ** 0.15
            return result
        mil_median = self.MODEL_MIL_MEDIANS['level-two'].get(
            str(int(make_year))
        )
        if mil_median is not None:
            result = pred_price * (mil_median / milage) ** 0.15
            return result
        mil_median = self.MODEL_MIL_MEDIANS["level-three"]
        result = pred_price * (mil_median / milage) ** 0.15
        return result