przyrost1
poprawione __str__ w plant i soil
This commit is contained in:
parent
3ddb999e3a
commit
97be779791
2
plant.py
2
plant.py
@ -16,7 +16,7 @@ class Plant:
|
||||
|
||||
#to sie drukuje jak zapytamy o stworzony obiekt
|
||||
def __str__(self):
|
||||
return 'Plant: %s , Soil: %s , Status: %s' % (self._name, self._soil, self._collect())
|
||||
return f'Plant: {self._name}, Soil: {self._soil}, Status: {self.collect()}'
|
||||
|
||||
#metoda abstrakcyjna, kazda roslina ma inny czas rosniecia wiec pass
|
||||
@abstractmethod
|
||||
|
Loading…
Reference in New Issue
Block a user