Ch. 8 Flashcards

loop structures and booleans

1
Q

A loop pattern that asks the user whether to continue on each iteration is called a(n)

A

interactive loop

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

A loop structure that tests the loop condition after executing the loop body is called a

A

post-test loop

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

What statement can be executed in the body of a loop to cause it to terminate?

A

break

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

Which of the following is not a valid rule of Boolean algebra?

A

(True or x) == True

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

A loop that never terminates is called

A

infinite

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

Which line would not be found in a truth table for and?

A

TFT

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

Which line would not be found in a truth table for or

A

FTF

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

not (P and Q)

A

FTTT

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

(not P) and Q

A

FFTF

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

(not P) or (not Q)

A

FTTT

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