initial commit

This commit is contained in:
2023-07-16 13:23:25 +00:00
commit c3fa5367c3
85 changed files with 4921 additions and 0 deletions

22
Python/OOP3/task1.py Normal file
View File

@ -0,0 +1,22 @@
from abc import ABC, abstractmethod
class Animal(ABC):
@abstractmethod
def move(self):
pass
class Cat(Animal):
def move(self):
print("No. Cat doesn't want to move his furry arse")
class Dog(Animal):
def move(self) -> None:
print("Dog's running towards you")
animals: list[Animal] = [Cat(), Dog()]
for animal in animals:
animal.move()