how many values can a function return at a time
functions can only return one value at a time
a function can have
parameter
a variable in a function definition
- used as a placeholder for values that will be passed through the function
argument
the vlaue passed to the parameter
return
procedural abstraction
extracting shared features to generalize functionality
how do you generalize functions
using parameters
benefits of procedural abstraction
library
a collection of functions that can be used in many different programs
a library should have documentation for the included functions:
APIs (application program interface)
specifications for how the functions in a library behave and can be used
procedural abstraction allows functions to be used without
knowing their inner workings enabling modularity, which organizes programs into separate subprograms, like libraries do
to use a library
call the function by writing the library name, a dot, the name of the function, and including any arguments for the parameters