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

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

Solution #1644

wants to merge 3 commits into from

Conversation

alega1705
Copy link

No description provided.

# write your code here
pass

def __init__(self, comfort_class, clean_mark, brand):

Choose a reason for hiding this comment

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

add type annotations for "comfort_class", "clean_mark", "brand" and return type for init method


class CarWashStation:
# write your code here
pass
def __init__(self, distance_from_city_center, clean_power, average_rating, count_of_ratings):

Choose a reason for hiding this comment

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

add type annotations for 'distance_from_city_center'. 'clean_power'. 'average_rating'. 'count_of_ratings' and return type for init method

def __init__(self, comfort_class, clean_mark, brand):
self.comfort_class = comfort_class
self.clean_mark = clean_mark
self.brand = brand

Choose a reason for hiding this comment

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

gotta be to blank lines between classes


class CarWashStation:
# write your code here
pass
def __init__(self, distance_from_city_center, clean_power, average_rating, count_of_ratings):

Choose a reason for hiding this comment

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

line's too long. you can put each parameter on separate line

self.average_rating = average_rating
self.count_of_ratings = count_of_ratings

def serve_cars(self, cars):

Choose a reason for hiding this comment

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

add type annotation for 'cars' and return type for the function


def rate_service(self, rating):
self.count_of_ratings += 1
self.average_rating = round(((self.average_rating * (self.count_of_ratings - 1)) + rating) / self.count_of_ratings, 1)

Choose a reason for hiding this comment

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

divide this line into several

self.count_of_ratings += 1
self.average_rating = round(((self.average_rating * (self.count_of_ratings - 1)) + rating) / self.count_of_ratings, 1)


Choose a reason for hiding this comment

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

remove unnecessary blank lines

# Example Usage:

# Create Car objects
bmw = Car(comfort_class=3, clean_mark=3, brand='BMW')

Choose a reason for hiding this comment

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

change single quotes into double quotes


# Create Car objects
bmw = Car(comfort_class=3, clean_mark=3, brand='BMW')
audi = Car(comfort_class=4, clean_mark=9, brand='Audi')

Choose a reason for hiding this comment

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

change single quotes into double quotes


# Create Car objects
bmw = Car(comfort_class=3, clean_mark=3, brand='BMW')
audi = Car(comfort_class=4, clean_mark=9, brand='Audi')

Choose a reason for hiding this comment

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

fix trailing whitespace

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