6. User-Defined Functions Flashcards
A(n) ____ is a named list of statements.
function
A function ____ consists of the new function’s name and a block of statements. The function’s name can be any valid identifier.
definition
A function ____ is an invocation of a function’s name, causing the function’s statements to execute.
call
A(n) ____ variable is a variable declared in a function, which is then accessible only within that function
local
A program’s execution begins with the ____ function.
Main
A(n) ____ is a function input specified in a function definition.
parameter
E.g., A pizza area function might have diameter as an input.
A(n) ____ is a value provided to a function’s parameter during a function call.
argument
E.g., A pizza area function might be called as PrintPizzaArea(12.0) or as PrintPizzaArea(16.0).
A function may return one value by assigning a return ____ with the return ____.
variable, value
How many return variables can a function have?
One
A function call evaluates to the ____.
returned value
____ development is the process of dividing a program into separate units that can be developed and tested separately and then integrated into a single program.
Modular
____ development is a process in which a programmer writes and tests a few statements, then writes and tests a small amount more (an incremental amount), and so on.
Incremental
A ____ is a function definition whose statements have not yet been written.
function stub
A general guideline (especially for beginner programmers) is that a function’s definition usually shouldn’t have more than about ____ statements, although this guideline is not a strict rule.
20