Chapter 8 Flashcards
TF
A Python while implements a definite loop.
False
TF
The counted loop pattern uses a definite loop.
True
TF
A sentinel loop asks the user whether to continue on each iteration.
False
TF
A sentinel loop should not actually process the sentinel value.
True
TF
The easiest way to iterate through the lines of a file in Python is to use a while loop.
False
TF
A while loop is a post-test loop.
False
TF
The Boolean operator or return True when both of its operands are true.
True
TF a and (b or c) == (a and b) or (a and c
True
TF
not(a or b) == (not a) or not(b)
False
TF
True or False
True
A loop pattern that asks the user whether to continue on each iteration is called a(n)
Interactive loop
A loop pattern that continues until a special value is input is called a(n)
sentinel loop
A loop structure that tests the loop condition after executing the loop body is called a
Post-test-loop
A priming read is part of the pattern for a(n)
sentinel loop
What statement can be executed in the body of a loop to cause it to terminate?
Break