Chapter 3 Flashcards
Control structure
Logical design that control the order in which set of statements execute.
Sequence structure
Set of statements that execute in the order they appear.
Decision structure
Specific action(s) performed only if a condition exist. Also known as selection structure.
Single alternative decision structure
Provides only one alternative path of execution. If condition is not true, exit the structure.
if clause
The first line in an if statement.
Boolean expression
Expression tested by if statement to determine if it is true or false.
Relational operator
Determines if a specific relationship exists between two values (examples: < and >).
Dual alternative decision structure
Two possible paths of execution.
if-elif-else statement
Special version of decision structure
Logical operators
Operators that can be used to create complex Boolean expressions.
and operator & or operator
Binary operators. Connect two Boolean expressions into a compound Boolean expression.
not operator
Unary operator. Reverses the truth of its Boolean operand.
Short circuit evaluation
Deciding the value of a compound Boolean expression after evaluation only one sub expression.
Boolean variable
References one of two values: True or False
Flag
Variable that signals when some condition exists in a program.