-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Solution #1639
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 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 acontinue
to simplify your code. - Type Annotations: Ensure that you use the correct types in your method signatures, such as specifying
Car
instead oftype
and usingfloat
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 |
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 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.
def __init__(self, comfort_class: int, clean_mark: int, brand: str) \ | ||
-> None: |
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 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: |
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 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: |
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.
Similar to the previous comment, the type
keyword is used incorrectly. Specify the type of car
as Car
instead of type
.
No description provided.