File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -182,9 +182,8 @@ So far our functions seem to be really isolated from the rest of our
182
182
code, and it sucks! But they really are not as isolated as you might
183
183
think they are.
184
184
185
- Let's think about what the built-in function input does. It takes an
186
- argument, and returns a value. Maybe a custom function could do that
187
- also?
185
+ Let's think about what the print function does. It takes an argument
186
+ and prints it. Maybe a custom function could also take an argument?
188
187
189
188
``` py
190
189
>> > def print_twice (message ):
@@ -312,7 +311,7 @@ print_box("Hello World", "*")
312
311
```
313
312
314
313
But we don't need to change our existing code. We can make the second
315
- argument ** optional** by giving it a ** default value** .
314
+ argument ** optional** by giving it a default value.
316
315
317
316
``` py
318
317
def print_box (message , character = ' *' ):
@@ -438,9 +437,7 @@ functions.
438
437
and all the exercises because you didn' t know how to define
439
438
functions. Read those parts now, and do the exercises.
440
439
441
-
442
-
443
- 5 . Use a search engine (e.g. Google) to find more exercises about
440
+ 4 . Use a search engine (e.g. Google) to find more exercises about
444
441
defining functions.
445
442
446
443
Answers for the first and second exercise are [here](answers.md).
You can’t perform that action at this time.
0 commit comments