Skip to content

Commit

Permalink
ternaries added
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Katkalov committed Aug 13, 2023
1 parent 48fe292 commit 617b4ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(
) -> None:
self.name = name
self.weight = weight
self.coords = coords or [0, 0]
self.coords = coords if coords else [0, 0]

def go_forward(self, step: int = 1) -> None:
self.coords[1] += step
Expand All @@ -38,7 +38,7 @@ def __init__(
coords: list[int] = None,
) -> None:
super().__init__(name, weight, coords)
self.coords = coords or [0, 0, 0]
self.coords = coords if coords else [0, 0, 0]

def go_up(self, step: int = 1) -> None:
self.coords[2] += step
Expand Down

0 comments on commit 617b4ba

Please sign in to comment.