Functions Flashcards

1
Q

what is the purpose of a function?

A

to encapsulate a portion of your program so that it can be called without the need to know exactly how the function does its job

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is the purpose of a docstring?

A

to tell a programmer everything they need to know in order to successfully call your function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the difference between arguments and parameters?

A

parameters tell you what the function needs; arguments are the specific values that you give the function in any particular instance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly