Chapter 5 Flashcards

1
Q

block

A

A group of consecutive statements with the same indentation.

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

body

A

The block of statements in a compound statement that follows the header.

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

Boolean algebra

A

Some rules for rearranging and reasoning about Boolean expressions.
Boolean expression

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

Boolean expression

A

An expression that is either true or false.

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

Boolean value

A

There are exactly two Boolean values: True and False. Boolean values result when a Boolean expression is evaluated by the Python interepreter. They have type bool.

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

branch

A

One of the possible paths of the flow of execution determined by conditional executio

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

chained conditional

A

A conditional branch with more than two possible flows of execution. In Python chained conditionals are written with if … elif … else statements.

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

comparison operator

A

One of the six operators that compares two values: ==, !=, >, <, >=, and <=.

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

conditional statement

A

A statement that controls the flow of execution depending on some condition. In Python the keywords if, elif, and else are used for conditional statements.

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

nesting

A

One program structure within another, such as a conditional statement inside a branch of another conditional statement.

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

prompt

A

A visual cue that tells the user that the system is ready to accept input data.

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

truth table

A

A concise table of Boolean values that can describe the semantics of an operator.

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

type conversion

A

An explicit function call that takes a value of one type and computes a corresponding value of another type.

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

wrapping code in a function

A

The process of adding a function header and parameters to a sequence of program statements is often refered to as “wrapping the code in a function”. This process is very useful whenever the program statements in question are going to be used multiple times. It is even more useful when it allows the programmer to express their mental chunking, and how they’ve broken a complex problem into pieces