File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262- 🔗 [ Chapter 6 - Lists & Tuples] ( https://github.com/gitdagray/python-course/tree/main/lesson06 )
6363- 🔗 [ Chapter 7 - Dictionaries & Sets] ( https://github.com/gitdagray/python-course/tree/main/lesson07 )
6464- 🔗 [ Chapter 8 - While Loops & For Loops] ( https://github.com/gitdagray/python-course/tree/main/lesson08 )
65+ - 🔗 [ Chapter 9 - Functions] ( https://github.com/gitdagray/python-course/tree/main/lesson09 )
Original file line number Diff line number Diff line change 1+ def hello_world ():
2+ print ("Hello world!" )
3+
4+
5+ hello_world ()
6+
7+
8+ def sum (num1 = 0 , num2 = 0 ):
9+ if (type (num1 ) is not int or type (num2 ) is not int ):
10+ return 0
11+ return num1 + num2
12+
13+
14+ total = sum (7 , 2 )
15+ print (total )
16+
17+
18+ def multiple_items (* args ):
19+ print (args )
20+ print (type (args ))
21+
22+
23+ multiple_items ("Dave" , "John" , "Sara" )
24+
25+
26+ def mult_named_items (** kwargs ):
27+ print (kwargs )
28+ print (type (kwargs ))
29+
30+
31+ mult_named_items (first = "Dave" , last = "Gray" )
You can’t perform that action at this time.
0 commit comments