APCSP Vocab

Algorithm - A general step by step process for solving a problem.


Bug - An error in a program.


byte code - An intermediate language between source code and object code. Many modern languages first compile source code into byte code and then interpret the byte code with a program called a virtual machine.


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


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


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


Exception - Another name for a runtime error.


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


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.


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


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


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


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


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


Program - A sequence of instructions that specifies to a computer actions and computations to be performed.


programming language - A formal notation for representing solutions.


runtime error - An error that does not occur until the program has started to execute but that prevents the program from continuing.


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


source code - A program, stored in a file, in a high-level language before being compiled or interpreted.


Syntax - The structure of a program.


syntax error - An error in a program that makes it impossible to parse — and therefore impossible to interpret.


assignment statement - A statement that assigns a value to a name (variable). To the left of the assignment operator, =, is a name. To the right of the assignment token is an expression which is evaluated by the Python interpreter and then assigned to the name. The difference between the left and right hand sides of the assignment statement is often confusing to new programmers. In the following assignment:


n = n + 1

n plays a very different role on each side of the =. On the right it is a value and makes up part of the expression which will be evaluated by the Python interpreter before assigning it to the name on the left.


data type - A set of values. The type of a value determines how it can be used in expressions. The basic data types in Python are integers (int), floating-point numbers (float), and strings (str).


Decrement - Decrease by 1.


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


Expression - A combination of operators and operands (variables and values) that represents a single result value. Expressions are evaluated to give that result.


Float - A 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.


Increment - Both as a noun and as a verb, increment means to increase by 1.


initialization (of a variable) - To initialize a variable is to give it an initial value. Since in Python variables don’t exist until they are assigned values, they are initialized when they are created. In other programming languages this is not the case, and variables can be created without being initialized, in which case they have either default or garbage values.

integer division - An operation that divides one integer by another and yields an integer. Integer division yields only the whole number of times that the numerator is divisible by the denominator and discards any remainder.


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


modulus operator - Also called remainder operator or integer remainder operator. Gives the remainder after performing integer division.


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


Statement - An instruction that the Python interpreter can execute. So far we have only seen the assignment statement, but we will soon meet the import statement and the for statement.


Str - A Python data type that holds a string of characters.


type conversion function(cast) - A function that can convert a data value from one type to another.


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.


variable name - A name given to a variable. Variable names in Python consist of a sequence of letters (a..z, A..Z, and _) and digits (0..9) that begins with a letter. In best programming practice, variable names should be chosen so that they describe their use in the program, making the program self documenting.


Block - A group of consecutive statements with the same indentation.


boolean expression - An expression that is either true or false.


boolean function - A function that returns a boolean value. The only possible values of the bool type are False and True.


boolean value - There are exactly two boolean values: True and False. Boolean values result when a boolean expression is evaluated by the Python interpreter. They have type bool.


comparison operator - One of the operators that compares two values: ==, !=, >, <, >=, and <=.


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


conditional statement - A statement that controls the flow of execution depending on some condition. In Python the keywords if, elif, and else are used for conditional statements.


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


Nesting - One program structure within another, such as a conditional statement inside a branch of another conditional statement.


Sequence - The default behavior of a program. Step by step processing of algorithm.


Selection - The process of making a decision based on a boolean expression. The result of the decision determines which path the program will take next.


Iteration - Repeated execution of a set of programming statements. Also called looping.


Function -  a block of organized code that is used to perform a single task. They provide better modularity for your application and reuse-ability. Depending on the programming language, a function may be called a subroutine, a procedure, a routine, a method, or a subprogram.


Parameter - a special kind of variable used in a function to refer to one of the pieces of data provided as input to the function. 


Argument - the value that is passed to the parameter when the function is called.


return value - The value provided as the result of a function call.


dead code - Part of a program that can never be executed, often because it appears after a return statement.


Counter - A variable used to count something, usually initialized to zero and incremented in the body of a loop.


definite iteration - A loop where we have an upper bound on the number of times the body will be executed. Definite iteration is usually best coded as a for loop.


escape sequence - An escape character, \, followed by one or more printable characters used to designate a nonprintable character.


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


indefinite iteration - A loop where we just need to keep going until some condition is met. A while statement is used for this case.


Loop - A statement or group of statements that execute repeatedly until a terminating condition is satisfied.


loop variable - A variable used as part of the terminating condition of a loop.


nested loop - A loop inside the body of another loop.


Reassignment - Making more than one assignment to the same variable during the execution of a program.


Index - An integer variable or value that indicates an element of a list.


List - A collection of objects, where each object is identified by an index. Like other types str, int, float, etc. there is also a list type-converter function that tries to turn its argument into a list.


list traversal - The sequential accessing of each element in a list.


nested list - A list that is an element of another list.


Tuple - A sequential collection of items, similar to a list. Any python object can be an element of a tuple. However, unlike a list, tuples are immutable.