py4e Chapter 3 Flashcards

1
Q

body

A

The sequence of statements within a compound statement

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

boolean expression

A

An expression whose value is either True or False

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

branch

A

One of the alternative sequences of statements in a conditional statement.

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

chained conditional

A

A conditional statement with a series of alternative branches.

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

comparison operator

A

One of the operators that compares its operands: ==,

!=, >, =, and <=.

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

conditional statement

A

A statement that controls the flow of execution depending on some condition.

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

condition

A

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

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

compound statement

A

a statement that consists of a header and a body. the header ends with a colon (:). The body is indented relative to the header.

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

guardian pattern

A

Where we construct a logical expression with additional comparisons to take advantage of the short-circuit behavior.

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

Logical operator

A

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

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

nested conditional

A

A conditional statement that appears in one of the branches of another conditional statement.

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

Traceback

A

a list of the functions that are executing, printed when an exception occurs.

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

Short circuit

A

When python is part-way through evaluating a logical expression and stops the evaluation because Python knows the final value for the expression without needing to evaluate the rest of the expression.

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