Skip to content

Commit

Permalink
Corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
gertsovenko committed Dec 5, 2023
1 parent 9572859 commit e6a456b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
class Animal:
alive = []

def __init__(self, name: str, health: int = 100) -> None:
def __init__(
self,
name: str,
health: int = 100
) -> None:
self.name = name
self.health = health
self.hidden = False
Animal.alive.append(self)

def __repr__(self) -> str:
return str(
f"{{Name: {self.name}, "
f"Health: {self.health}, "
f"Hidden: {self.hidden}}}"
)
return (f"{{Name: {self.name}, "
f"Health: {self.health}, "
f"Hidden: {self.hidden}}}")


class Herbivore(Animal):
Expand Down

0 comments on commit e6a456b

Please sign in to comment.