Exam 3 Study Vocab Flashcards
(87 cards)
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.