-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #1234
base: master
Are you sure you want to change the base?
Solution #1234
Conversation
app/main.py
Outdated
if coords is None: | ||
self.coords = [0, 0] |
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.
if coords is None: | |
self.coords = [0, 0] | |
if self.coords = coords or [0, 0] |
app/main.py
Outdated
# write your code here | ||
|
||
class BaseRobot: | ||
def __init__(self, name: str, weight: int, coords: list = None) -> 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.
def __init__(self, name: str, weight: int, coords: list = None) -> None: | |
def __init__(self, name: str, weight: int, coords: list[int] = None) -> None: |
app/main.py
Outdated
if coords is None: | ||
self.coords = [0, 0, 0] |
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 same here
app/main.py
Outdated
) -> None: | ||
self.name = name | ||
self.weight = weight | ||
self.coords = coords if coords is not None else [0, 0] |
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.
self.coords = coords if coords is not None else [0, 0] | |
self.coords = coords or [0, 0] |
app/main.py
Outdated
class FlyingRobot(BaseRobot): | ||
def __init__(self, name: str, weight: int, coords: list = None) -> None: | ||
super().__init__(name, weight, coords) | ||
self.coords = coords if coords is not None else [0, 0, 0] |
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.
and here
No description provided.