summaryrefslogtreecommitdiffstats
path: root/ExampleSubmission/animals.py
diff options
context:
space:
mode:
Diffstat (limited to 'ExampleSubmission/animals.py')
-rw-r--r--ExampleSubmission/animals.py50
1 files changed, 26 insertions, 24 deletions
diff --git a/ExampleSubmission/animals.py b/ExampleSubmission/animals.py
index d32d6ff..924c6fb 100644
--- a/ExampleSubmission/animals.py
+++ b/ExampleSubmission/animals.py
@@ -1,24 +1,26 @@
-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)"
-
-print() \ No newline at end of file
+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:
+ f.write(kitten.speak()) \ No newline at end of file