Skip to content
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 #1610

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Solution #1610

wants to merge 2 commits into from

Conversation

Iryna802498
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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 effectively. While there are minor improvements suggested, such as simplifying the average rating calculation and renaming a variable for clarity, these do not impact the core functionality. Keep up the good work and consider these suggestions for even cleaner code in the future! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

app/main.py Outdated
for car in cars:
if car.clean_mark < self.clean_power:
wash_price = self.calculate_washing_price(car)
total_cars += wash_price

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable total_cars is intended to accumulate the total washing price, but the name is misleading. Consider renaming it to total_price or total_revenue for clarity.

Comment on lines +35 to +37
self.average_rating = round((self.average_rating
* self.count_of_ratings + new_rate)
/ (self.count_of_ratings + 1), 1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calculation for the new average rating is correct, but it could be simplified for better readability. Consider breaking it down into smaller steps or using descriptive variable names for intermediate calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants