From e5203f74000dc083d3e4024725a0e50656bf776b Mon Sep 17 00:00:00 2001 From: jwansek Date: Wed, 16 Feb 2022 15:45:37 +0000 Subject: fixed bug when client classes weren't present --- ExampleSubmission/animals.py | 55 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'ExampleSubmission/animals.py') diff --git a/ExampleSubmission/animals.py b/ExampleSubmission/animals.py index 924c6fb..d1c933a 100644 --- a/ExampleSubmission/animals.py +++ b/ExampleSubmission/animals.py @@ -1,26 +1,31 @@ -import datetime - -class Animal: - def __init__(self): - self.birthday = datetime.datetime.now() - - def move(self): - return "*moves*" - -class Dog(Animal): - def speak(self): - return "woof" - -class Cat(Animal): - def speak(self): - return "meow" - -class Kitten(Cat): - """nyaa~~~ - """ - def speak(self): - return "meow (but cuter)" - -kitten = Kitten() -with open("animals.txt", "w") as f: +import datetime + +class Animal: + def __init__(self): + self.birthday = datetime.datetime.now() + + def move(self): + return "*moves*" + +class Dog(Animal): + """Some + + multiline + + docs""" + def speak(self): + return "woof" + +class Cat(Animal): + def speak(self): + return "meow" + +class Kitten(Cat): + """nyaa~~~ + """ + def speak(self): + return "meow (but cuter)" + +kitten = Kitten() +with open("animals.txt", "w") as f: f.write(kitten.speak()) \ No newline at end of file -- cgit v1.2.3