Initialer Import der Synology Scripts

This commit is contained in:
root
2026-08-05 08:43:57 +02:00
commit 5e32a7c411
404 changed files with 79932 additions and 0 deletions
@@ -0,0 +1,38 @@
class Animal:
def __init__(self, weight, height):
self.weight = weight
self.height = height
def print_data(self):
print("Height: ", self.height)
print("Weight: ", self.weight)
class Dog(Animal):
def __init__(self, weight, height):
super().__init__(weight, height)
def bark(self):
print("Bark!")
class Cat(Animal):
def __init__(self, weight, height):
super().__init__(weight, height)
def meow(self):
print("Meow!")
def main():
dog = Dog(10, 0.8)
dog.print_data()
dog.bark()
cat = Cat(3, 0.3)
cat.print_data()
cat.meow()
if __name__ == "__main__":
main()