Chapter 3-4 Flashcards
(18 cards)
A statement that creates a function
function definition
The first line of a function definition
header
The sequence of statements inside a function definition
body
A value created by a function definition. The name of the function is a variable that refers to a function object
function object
A name used inside a function to refer to the value passed as an argument
parameter
A statement that runs one or more statements, often repeatedly
loop
A variable defined inside a function, and which can only be accessed inside the function
local variable
A process for writing programs
development plan
A window used to display graphical elements including lines, circles, rectangles, and other shapes
canvas
The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter)
generalization
The process of modifying a working program to improve function interfaces and other qualities of the code
refactoring
A requirement that should be satisfied by the caller before a function starts
precondition
A requirement that should be satisfied by the function before it ends
postcondition
A string enclosed in triple quotes that can span more than one line of a program
multiline string
A string that appears at the top of a function definition to document the function’s interface
docstring
A process for designing the interface of a function, which includes the parameters it should take
interface design
An argument that includes the name of the parameter
keyword argument
The process of transforming a sequence of statements into a function definition
encapsulation