Exam 3 Study Vocab Flashcards
debugging
The process of finding and removing any of the three kinds of programming errors.
exception
An error that occurs at runtime.
interpret
To execute a program in a high-level language by translating it one line at a time.
parse
To examine a program and analyze the syntactic structure.
print statement
An instruction that causes the Python interpreter to display a value on the screen.
Python Shell
An interactive user interface to the Python interpreter. The user of a Python shell types commands at the prompt (»>), and presses the return key to send these commands immediately to the interpreter for processing.
runtime error
An error that does not occur until the program has started to execute but that prevents the program from continuing.
script
A program stored in a file (usually one that will be interpreted).
syntax error
An error in a program that makes it impossible to parse — and therefore impossible to interpret.
data type
A set of values. The type of a value determines how it can be used in expressions. So far, the types you have seen are integers (type int), floating-point numbers (type float), and strings (type str).
expression
A combination of variables, operators, and values that represents a single result value.
float
Python data type which stores floating-point numbers. Floating-point numbers are stored internally in two parts: a base and an exponent. When printed in the standard format, they look like decimal numbers. Beware of rounding errors when you use floats, and remember that they are only approximate values.
int
A Python data type that holds positive and negative whole numbers.
statement
An instruction that the Python interpreter can execute. Examples of statements include the assignment statement and the print statement.
str
A Python data type that holds a string of characters.
value
A number or string (or other things to be named later) that can be stored in a variable or computed in an expression.
variable
A name that refers to a value.
for loop
A statement in Python for convenient repetition of statements in the body of the loop.
loop body*
Any number of statements nested inside a loop. The nesting is indicated by the fact that the statements are indented under the for loop statement.
loop variable
A variable used as part of a for loop. It is assigned a different value on each iteration of the loop.
instance
An object of a certain type, or class. tess and alex are different instances of the class Turtle. module
module
A file containing Python definitions and statements intended for use in other Python programs. The contents of a module are made available to the other program by using the import statement.
object
A “thing” to which a variable can refer. This could be a screen window, or one of the turtles you have created.
function
function
A named sequence of statements that performs some useful operation. Functions may or may not take parameters and may or may not produce a result.
header
The first part of a compound statement. Headers begin with a keyword and end with a colon (:)
import statement
import statement
A statement which permits functions and variables defined in a Python script to be brought into the environment of another script or a running Python shell.
local variable
A statement which permits functions and variables defined in a Python script to be brought into the environment of another script or a running Python shell
parameter
A name used inside a function to refer to the value passed as an argument.
boolean expression
An expression that is either true or false.
boolean function
A function that returns a boolean value
None
A special Python value returned by functions that have no return statement, or a return statement without an argument. None is the only value of the type, NoneType.
return value
The value provided as the result of a function call.
counter
A variable used to count something, usually initialized to zero and incremented in the body of a loop.
cursor
An invisible marker that keeps track of where the next character will be printed.