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

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

relational 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
4
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
5
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
6
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
7
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
8
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
9
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
10
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
11
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
12
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
13
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