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 #1639

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #1639

wants to merge 1 commit into from

Conversation

vllynnyk
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 performs the expected operations effectively. While there are a few minor issues related to code style and clean code practices, they do not impact the functionality of your solution.

Here are some suggestions for improvement:

  • Code Style: Avoid using backslashes for line continuation in mathematical expressions. Instead, split expressions after binary operations for better readability.
  • Clean Code: Consider removing unnecessary else statements after a continue to simplify your code.
  • Type Annotations: Ensure that you use the correct types in your method signatures, such as specifying Car instead of type and using float for parameters as needed.

Keep up the great work, and happy coding! 😊

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

@@ -1,8 +1,50 @@
import decimal

Choose a reason for hiding this comment

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

The decimal module is imported but not used correctly in the type annotations. You should use float for the average_rating parameter in the CarWashStation class, as specified in the task description.

Comment on lines +5 to +6
def __init__(self, comfort_class: int, clean_mark: int, brand: str) \
-> None:

Choose a reason for hiding this comment

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

The line continuation character \ is not needed here. You can simply place the -> None: on the same line as the method signature.

"""method then return income of wash station and change clean_mark of car,
if clean_mark less than clean_power of wash station"""

def calculate_washing_price(self, car: type) -> decimal:

Choose a reason for hiding this comment

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

The type keyword is used incorrectly here. You should specify the type of car as Car instead of type.

return round(wash_car_price, 1)
"""method return washing price of single car"""

def wash_single_car(self, car: type) -> None:

Choose a reason for hiding this comment

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

Similar to the previous comment, the type keyword is used incorrectly. Specify the type of car as Car instead of type.

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