Variables, Expressions and Statements Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

value

A

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

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

type

A

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

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

integer

A

A type that represents whole numbers.

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

floating-point

A

A type that represents numbers with fractional parts.

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

string

A

A type that represents sequences of characters.

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

keyword

A

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.

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

operator

A

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

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

floor division

A

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

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

expression

A

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

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

rules of precedence

A

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

17
Q

concatenate

A

To join two operands end-to-end.

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