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
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
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