Glossary of Common Words in Computer Programming

problem solving:
The process of formulating a problem, finding a solution, and expressing the solution.

high-level language:
A programming language like Python that is designed to be easy for humans to read and write.

low-level language:
A programming language that is designed to be easy for a computer to execute; also called “machine language” or “assembly language.”

A property of a program that can run on more than one kind of computer.

To execute a program in a high-level language by translating it one line at a time.

To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.

source code:
A program in a high-level language before being compiled.

object code:
The output of the compiler after it translates the program.

Another name for object code that is ready to be executed.

Characters displayed by the interpreter to indicate that it is ready to take input from the user.

A program stored in a file (usually one that will be interpreted).

interactive mode:
A way of using the Python interpreter by typing commands and expressions at the prompt.

script mode:
A way of using the Python interpreter to read and execute statements in a script.

A set of instructions that specifies a computation.

A general process for solving a category of problems.

An error in a program.

The process of finding and removing any of the three kinds of programming errors.

The structure of a program.

syntax error:
An error in a program that makes it impossible to parse (and therefore impossible to interpret).

An error that is detected while the program is running.

The meaning of a program.

semantic error:
An error in a program that makes it do something other than what the programmer intended.

natural language:
Any one of the languages that people speak that evolved naturally.

formal language:
Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.

One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.

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.

One of the basic units of data, like a number or string, that a program manipulates.

A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).

A type that represents whole numbers.

A type that represents numbers with fractional parts.

A type that represents sequences of characters.

A name that refers to a value.

A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.

A statement that assigns a value to a variable.

state diagram:
A graphical representation of a set of variables and the values they refer to.

A reserved word that is used by the compiler to parse a program; you cannot use keywords like if, def, and while as variable names.

A special symbol that represents a simple computation like addition, multiplication, or string concatenation.

One of the values on which an operator operates.

floor division:
The operation that divides two numbers and chops off the fraction part.

A combination of variables, operators, and values that represents a single result value.

To simplify an expression by performing the operations in order to yield a single value.

rules of precedence:
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.

To join two operands end-to-end.

Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program.

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 executes.

function object:
A value created by a function definition. The name of the function is a variable that refers to a function object.

The first line of a function definition.

The sequence of statements inside a function definition.

A name used inside a function to refer to the value passed as an argument.

function call:
A statement that executes a function. It consists of the function name followed by an argument list.

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 doesn’t return a value.

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.

module object:
A value created by an import statement that provides access to the values defined in a module.

dot notation:
The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name.

Using an expression as part of a larger expression, or a statement as part of a larger statement.

flow of execution:
The order in which statements are executed during a program run.

stack diagram:
A graphical representation of a stack of functions, their variables, and the values they refer to.

A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function.

A list of the functions that are executing, printed when an exception occurs.

A member of a set. The TurtleWorld in this chapter is a member of the set of TurtleWorlds.

A part of a program that can execute repeatedly.

The process of transforming a sequence of statements into a function definition.

The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter).

keyword argument:
An argument that includes the name of the parameter as a “keyword.”

A description of how to use a function, including the name and descriptions of the arguments and return value.

The process of modifying a working program to improve function interfaces and other qualities of the code.

development plan:
A process for writing programs.

A string that appears in a function definition to document the function’s interface.

A requirement that should be satisfied by the caller before a function starts.

A requirement that should be satisfied by the function before it ends.

modulus operator:
An operator, denoted with a percent sign (%), that works on integers and yields the remainder when one number is divided by another.

boolean expression:
An expression whose value is either True or False.

relational operator:
One of the operators that compares its operands: ==, !=, >, <, >=, and <=.

logical operator:
One of the operators that combines boolean expressions: and, or, and not.

conditional statement:
A statement that controls the flow of execution depending on some condition.

The boolean expression in a conditional statement that determines which branch is executed.

compound statement:
A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header.

One of the alternative sequences of statements in a conditional statement.

chained conditional:
A conditional statement with a series of alternative branches.

nested conditional:
A conditional statement that appears in one of the branches of another conditional statement.

The process of calling the function that is currently executing.

base case:
A conditional branch in a recursive function that does not make a recursive call.

infinite recursion:
A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error.

temporary variable:
A variable used to store an intermediate value in a complex calculation.

dead code:
Part of a program that can never be executed, often because it appears after a returnstatement.

A special value returned by functions that have no return statement or a return statement without an argument.

incremental development:
A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time.

Code that is used during program development but is not part of the final version.

A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error.

multiple assignment:
Making more than one assignment to the same variable during the execution of a program.

An assignment where the new value of the variable depends on the old.

An assignment that gives an initial value to a variable that will be updated.

An update that increases the value of a variable (often by one).

An update that decreases the value of a variable.

Repeated execution of a set of statements using either a recursive function call or a loop.

infinite loop:
A loop in which the terminating condition is never satisfied.

Something a variable can refer to. For now, you can use “object” and “value” interchangeably.

An ordered set; that is, a set of values where each value is identified by an integer index.

One of the values in a sequence.

An integer value used to select an item in a sequence, such as a character in a string.

A part of a string specified by a range of indices.

empty string:
A string with no characters and length 0, represented by two quotation marks.

The property of a sequence whose items cannot be assigned.

To iterate through the items in a sequence, performing a similar operation on each.

A pattern of traversal that stops when it finds what it is looking for.

A variable used to count something, usually initialized to zero and then incremented.

A function that is associated with an object and called using dot notation.

A statement that calls a method.

file object:
A value that represents an open file.

problem recognition:
A way of solving a problem by expressing it as an instance of a previously-solved problem.

special case:
A test case that is atypical or non-obvious (and less likely to be handled correctly).

Tags : Programming
Close Bitnami banner