some fixes + 02/ex5 WIP

This commit is contained in:
2026-01-17 10:47:13 +01:00
parent 33e4e6ed3d
commit 29c20da5b3
4 changed files with 111 additions and 13 deletions

View File

@@ -1,16 +1,16 @@
class Plants:
name: str
height: int
age: int
days: int
def __init__(self, name, height, age):
def __init__(self, name, height, days):
self.name = name
self.height = height
self.age = age
self.days = days
def print_plant(self):
print(self.name.capitalize() + ":", self.height, end="")
print("cm,", self.age, "days old")
print("cm,", self.days, "days old")
if __name__ == "__main__":