-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution #1794
base: master
Are you sure you want to change the base?
Solution #1794
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on implementing the Car
and CarWashStation
classes! 🎉 Your code meets the task requirements and constraints, and the methods are well-structured and functional. While there are minor suggestions to ensure the logic aligns perfectly with the task description, these do not significantly impact the functionality. Keep up the good work, and consider reviewing the conditions and formula to ensure they match the task requirements precisely. Happy coding! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
price = round( | ||
(car.comfort_class * (self.clean_power - car.clean_mark) | ||
* self.average_rating / self.distance_from_city_center), 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formula for calculating the washing price seems correct, but ensure that it aligns with the task description: car's comfort class * difference between wash station's clean power and car's clean mark * car wash station rating / car wash station distance to the center of the city
. Double-check that all variables are correctly used and calculated.
for each_car in cars: | ||
if each_car.clean_mark < self.clean_power: | ||
price += round(self.calculate_washing_price(each_car), 1) | ||
self.wash_single_car(each_car) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the serve_cars
method, ensure that the condition if each_car.clean_mark < self.clean_power
correctly reflects the task requirement to wash only cars with clean_mark
less than the station's clean_power
. The logic seems correct, but verify with the task description to ensure compliance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good!
No description provided.