Skip to content

Commit 2e0082c

Browse files
Day 8
1 parent c7f90b7 commit 2e0082c

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

Day 8/day_8_end.py

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
class Animal():
2+
name = 'Amy'
3+
noise = "Grunt"
4+
size = "Large"
5+
color = "Brown"
6+
hair = 'Covers body'
7+
def get_color(self, abc):
8+
return self.color + " " + abc
9+
@property
10+
def make_noise(self):
11+
return self.noise
12+
13+
14+
15+
dog = Animal()
16+
dog.get_color("red")
17+
18+
dog.make_noise
19+
20+
21+
#arg = Positional Arguments
22+
#kwarg = Keyword Argument
23+
abc = "new string"
24+
def some_func(arg_1, arg_2, kwarg_1=None, kwarg_2=None):
25+
print(arg_1, arg_2)
26+
if kwarg_1 != None:
27+
print(kwarg_1)
28+
#return arg_1
29+
30+
31+
some_func("abc", "car", kwarg_1='Not a big deal')
32+
33+
34+
email_address = "[email protected]"
35+
to_list = ['[email protected]']
36+
37+
38+
def send_email(email, to_list=to_list, from_list=from_list):
39+
pass
40+
41+
42+
43+
send_email("[email protected]", to_list=['[email protected]'], from_list=['[email protected]'])
44+
45+
46+
47+
48+
49+
50+
51+
52+

Day 8/day_8_start.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Animal():
2+
name = 'Amy'
3+
noise = "Grunt"
4+
size = "Large"
5+
color = "Brown"
6+
hair = 'Covers body'
7+
def get_color(self, abc):
8+
return self.color
9+
def make_noise(self):
10+
return self.noise

0 commit comments

Comments
 (0)