Chapter 3 Functions Flashcards
Function
A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.
Function Definition
A statement that creates a new function, specifying its name, parameters and the statements it contains.
Function Object
A value created by a function definition. The name of the function is a variable that refers to a function object.
Header
The first line of a function definition.
Body
The sequence of statements inside a function definition.
Parameter
A name used inside a function to refer to the value passed as an argument.
Function Call
A statement that runs a function. It consists of the function name followed by an argument list in parentheses.
Argument
A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
Local Variable
A variable defined inside a function. A local variable can only be used inside its function.
Return Value
The result of a function. If a function call is used as an expression, the return value is the value of the expression.
Fruitful function
A function that returns a value.
Void Function
A function that always returns None.
None
A special value returned by void functions.
Module
A file that contains a collection of related functions and other definitions.
Import Statement
A statement that reads a module file and creates a module object.