1/26
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Argument
Expression that appears within parentheses of function call. Python will evaluate this expression and copy its values into the appropriate parameters.
Assert Statement
Statement of the form: assert <boolean-expression> or assert <boolean-expression>, <string-expression>. If the boolean expression is true, an assert statement does nothing. If it is false, it produces an error and crashes Python.
Assignment Statement
<variable> = <expression>
If the variable does not exist yet, it creates the variable and stores the value of the expression inside. If the variable exists, the old value is replaces with the value of the expression.
Attribute
Variable stored inside of an object that can often be modified.
Call Frame
Formal representation of what Python uses when executing a function call. It contains the name of the function as well as all parameters and local variables. It also has an instruction counter that tracks the next line in the function that is to be executed. A call frame is deleted as soon as the call completes.
Call Stack
All the call frames of the currently executing function calls
Class
Any type not built into Python
Conditional Statement
if <boolean-expression>:
| <statement>
Constructor
Function that creates a mutable object. It puts the object in heap space and returns the name of the object so you can store it in a variable.
Expression
Python code that produces a value. Must be put inside of a statement.
Function
Parameterized sequence of statements, whose execution performs some task. Should be followed by a docstring ('“““…”””) that is precise and clear.
Fruitful function
Function that performs some task and returns a value
Function call
Invocation of a function with arguments. These arguments are placed into the parameter variables, and the body of the function is executed.
Function Header
the first line of a function definition. it includes the keyword def, the function name, parentheses, any parameters, and a colon.
Global space
area of memory that stores any variable not defined in the body of a function. Variables remain until explicitly erased or Python is quit.
The Heap
area of memory that stores mutable objects. it also stores function definitions and the contents of modules imported.
Literal
a literal is an expression, that when evaluated, evaluates to itself. An expression that is also a value
Method
Functions stored inside of an object.
Object
A value whose type is a class. Typically contain attributes which are variables inside of the object.
Print statement
print(<string-expression>)
Procedure
A function that performs some type of task and doesn’t return a value.
Return statement
return <expression>
Scope
Set of places in which a variable name can be referenced. global variables can be referenced by any function that is defined in the same module as the global variable or which imports that module. the scope of a parameter or local variable is the body of the function in which it is defined.
Specification
description of what a function should do. includes preconditions on the arguments, the return value, and any other details
Statement
command for Python to do something (assignment statements, return statements, assert statements, conditional-statements, import statements, procedures)
Type
set of values and the operations on them
Variable
named box that contains a value