Skip to content

Commit c7f90b7

Browse files
Day 7
1 parent f29db06 commit c7f90b7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Day 7/day_7.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class Animal():
2+
name = 'Amy'
3+
noise = "Grunt"
4+
size = "Large"
5+
color = "Brown"
6+
hair = 'Covers body'
7+
def get_color(self):
8+
return self.color
9+
def make_noise(self):
10+
return self.noise
11+
12+
13+
dog = Animal()
14+
dog.make_noise()
15+
dog.size = "small"
16+
dog.color = "black"
17+
dog.hair = "hairless"
18+
19+
20+
class Dog(Animal):
21+
name = 'Jon'
22+
size = "small"
23+
color = "black"
24+
age = 19
25+
26+
27+
jon = Dog()
28+
jon.color = 'white'
29+
jon.name = 'Jon Snow'
30+

0 commit comments

Comments
 (0)