Chap. 3 (Conds Execution & Exception Handling) Flashcards

Learning programming language for Data Science

1
Q

Define 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

Define 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

Define 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

Define 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

Define 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

Define 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

Define 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

Define 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

Define 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

Define 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

Define 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

Define Traceback

A

A list of 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

Define Short Circut

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