Chapter 2 Variables, Expressions and Statements Flashcards

1
Q

Variable

A

A name that refers to a value

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

Assignment

A

A statement that assigns a value to a variable.

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

State Diagram

A

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

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

Keyword

A

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

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

Operand

A

One of the values on which an operator operates.

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

Expression

A

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

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

Evaluate

A

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

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

Statement

A

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

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

Execute

A

To run a statement and do what is says.

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

Interactive mode

A

A way of using the Python interpreter by typing code at the prompt.

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

Script mode

A

A way of using the Python interpreter to read code from a script and run it.

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

Script

A

A program stored in a file.

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

Order of operations

A

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

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

Concatenate

A

To join two operands end to end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
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
16
Q

Syntax Error

A

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

17
Q

Exception

A

An error that is detected while the program is running.

18
Q

Semantics

A

The meaning of a program

19
Q

Semantic Error

A

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