Python Chapter 5 Flashcards

1
Q

modulus operator:

A

An operator, denoted with a percent sign (%), that works on integers and yields the remainder when one number is divided by another.

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

booleanexpression:

A

AnexpressionwhosevalueiseitherTrueorFalse. relationaloperator: Oneoftheoperatorsthatcomparesitsoperands:==,!=,>,=,and<=.

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

conditional statement:

A

A statement that controls the flow of execution depending on some condi- tion.

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

condition:

A

The boolean expression in a conditional statement that determines which branch is exe- cuted.

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

nested conditional:

A

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

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

recursion:

A

The process of calling the function that is currently executing.

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

base case:

A

A conditional branch in a recursive function that does not make a recursive call.

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

infinite recursion:

A

A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error.

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