Unit 7 Flashcards

1
Q

how many values can a function return at a time

A

functions can only return one value at a time

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

a function can have

A
  • parameters & return values in any capacity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

parameter

A

a variable in a function definition
- used as a placeholder for values that will be passed through the function

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

argument

A

the vlaue passed to the parameter

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

return

A
  • used to return the flow of control to the point where the procedure was called and to return the value of expression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

procedural abstraction

A

extracting shared features to generalize functionality

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

how do you generalize functions

A

using parameters

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

benefits of procedural abstraction

A
  • improves code readability
  • allows for code reuse
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

library

A

a collection of functions that can be used in many different programs

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

a library should have documentation for the included functions:

A
  • how each function works
  • a complete list of the parameters
  • what (if anything) will be returned
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

APIs (application program interface)

A

specifications for how the functions in a library behave and can be used

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

procedural abstraction allows functions to be used without

A

knowing their inner workings enabling modularity, which organizes programs into separate subprograms, like libraries do

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

to use a library

A

call the function by writing the library name, a dot, the name of the function, and including any arguments for the parameters

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