Starting Out with Python, 3e Ch 3

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A compound Boolean expression created with the "and" operator is true only when both subexpressions are true. T or F

True

A decision structure can be nested inside another decision structure. T or F

True

A compound Boolean expression created with the _____ operator is true only if both of its subexpressions are true. a. and b. or c. not d. both

and

A _____ structure can execute a set of statements only under certain circumstances. a. sequence b. circumstantial c. decision d. Boolean

decision

A(n) _____ structure tests a condition and then takes one path if the condition is true, or another path if the condition is false. a. if statement b. single alternative decision c. dual alternative decision d. sequence

dual alternative decision

A _____ is a Boolean variable that signals when some condition exists in the program. a. flag b. signal c. sentinel d. siren

flag

You use a(n) _____ statement to write a single alternative decision structure. a. test-jump b. if c. if-else d. if-call

if

A compound Boolean expression created with the ____ operator is true if either of its subexpressions is true. a. and b. or c. not d. either

or

The symbols >, <, and == are all _____ operators. a. relational b. logical c. conditional d. ternary

relational

A _____ structure provides one alternative path of execution. a. sequence b. single alternative decision c. one path alternative d. single execution decision

single alternative decision

A(n) _____ expression has a value of either true or false. a. binary b. decision c. unconditional d. Boolean

Boolean

A program can be made of only one type of control structure. You cannot combine structures. T or F

False

A single alternative decision structure tests a condition and then takes one path if the condition is true, or another path if the condition is false. T or F

False

You can write any program using only sequence structures. T or F

False

Explain what is meant by the term "conditionally executed."

Is a set of statements that are executed only when a certain condition is true. If the condition is false they will not be executed. Also called a single alternative decision structure.

You use a(n) _____ statement to write a dual alternative decision structure. a. test-jump b. if c. if-else d. if-call

if-else

and, or, and not are _____ operators. a. relational b. logical c. conditional d. ternary

logical

The _____ operator takes a Boolean expression as its operand and reverses its logical value. a. and b. or c. not d. either

not


Set pelajaran terkait

Honan-Chapter 4: Fluid and Electrolyte and Acid--Base Imbalances

View Set

Enums, Nested Classes, Interface Members

View Set

Florida Real Estate Associate Exam Questions

View Set

World Geography Chapter 10 Review

View Set