task3 #2

Merged
schmidmarco merged 40 commits from task3 into main 2026-03-13 10:11:18 +01:00
Showing only changes of commit 16497f059c - Show all commits

View File

@ -0,0 +1,21 @@
class Dog:
def speak(self) -> str:
return "wuff"
class Cat:
def speak(self) -> str:
return "miau"
class Robot:
def speak(self) -> str:
return "bip bup"
def chorus(animals) -> list:
for a in animals:
print(a.speak())
chorus([Dog(), Cat(), Robot()])