From 6c92b15aefdd6202f46b0dfb4b6555a9926b72a2 Mon Sep 17 00:00:00 2001 From: Kirill <138298380+Psychox1k@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:33:12 +0100 Subject: [PATCH] Update main.py --- app/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 32af6d14..14d79222 100644 --- a/app/main.py +++ b/app/main.py @@ -1,5 +1,6 @@ class Car: - def __init__(self, comfort_class: int, clean_mark: int, brand: str) -> None: + def __init__(self, comfort_class: int, clean_mark: int, brand: str) + -> None: self.comfort_class = comfort_class self.clean_mark = clean_mark self.brand = brand @@ -22,7 +23,8 @@ def serve_cars(self, cars: list[Car]) -> float: return round(total_income, 1) def calculate_washing_price(self, car: Car) -> float: - cost = (car.comfort_class * (self.clean_power - car.clean_mark) * + cost = (car.comfort_class * + (self.clean_power - car.clean_mark) * self.average_rating / self.distance_from_city_center) return round(cost, 1)