How to Think Like a Computer Scientist Flashcards

All Glossary terms from the interactive python org's site

1
Q

activecode

A

A unique interpreter environment that allows Python to be executed from within a web browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

algorithm

A

A general step by step process for solving a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

bug

A

An error in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

byte code

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

codelens

A

An interactive environment that allows the user to control the step by step execution of a Python program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

comment

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

compile

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

debugging

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

exception

A

Another name for a runtime error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

executable

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

formal language

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

high-level language

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

interpret

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

low-level language

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

natural language

A

Any one of the languages that people speak that evolved naturally.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

object code

A

The output of the compiler after it translates the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

parse

A

To examine a program and analyze the syntactic structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

portability

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

print function

A

A function used in a program or script that causes the Python interpreter to display a value on its output device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

problem solving

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

program

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

programming language

A

A formal notation for representing solutions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Python shell

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

runtime error

A

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

25
Q

semantic error

A

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

26
Q

semantics

A

The meaning of a program.

27
Q

shell mode

A

A style of using Python where we type expressions at the command prompt, and the results are shown immediately. Contrast with source code, and see the entry under Python shell.

28
Q

source code

A

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

29
Q

syntax

A

The structure of a program.

30
Q

syntax error

A

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

31
Q

token

A

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

32
Q

assignment statement

A

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.

33
Q

assignment token

A

= is Python’s assignment token, which should not be confused with the mathematical comparison operator using the same symbol.

34
Q

class

A

see data type

35
Q

comment

A

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.

36
Q

data type

A

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 (int), floating-point numbers (float), and strings (str).

37
Q

decrement

A

Decrease by 1.

38
Q

evaluate

A

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

39
Q

expression

A

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

40
Q

float

A

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.

41
Q

increment

A

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

42
Q

initialization (of a variable)

A

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.

43
Q

int

A

A Python data type that holds positive and negative whole numbers.

44
Q

integer division

A

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.

45
Q

keyword

A

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

46
Q

modulus operator

A

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

47
Q

object

A

Also known as a data object (or data value). The fundamental things that programs are designed to manipulate (or that programmers ask to do things for them).

48
Q

operand

A

One of the values on which an operator operates.

49
Q

operator

A

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

50
Q

prompt string

A

Used during interactive input to provide the use with hints as to what type of value to enter.

51
Q

reference diagram

A

A picture showing a variable with an arrow pointing to the value (object) that the variable refers to. See also state snapshot.

52
Q

rules of precedence

A

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

53
Q

state snapshot

A

A graphical representation of a set of variables and the values to which they refer, taken at a particular instant during the program’s execution.

54
Q

statement

A

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.

55
Q

str

A

A Python data type that holds a string of characters.

56
Q

type conversion function

A

A function that can convert a data value from one type to another.

57
Q

value

A

A number or string (or other things to be named later) that can be stored in a variable or computed in an expression.

58
Q

variable

A

A name that refers to a value.

59
Q

variable name

A

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.