click below
click below
Normal Size Small Size show me how
CSP/AP CSP
Unit 04: Unit - Vocab
| Term | Definition |
|---|---|
| Algorithm | A general step by step process for solving a problem. |
| Bug | An error in a program. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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 | Name given to a variable. Variable names in Python consist of a sequence of letters and digits that begins with a letter. |
| 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. |
| 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. |
| infinite loop | A loop in which the terminating condition is never satisfied. |
| 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. |
| 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. |