CMPTR Ch. 3 – Flashcards

Unlock all answers in this set

Unlock answers
question
Control structure
answer
logical design that controls order in which set of statements execute
question
Sequence structure
answer
set of statements that execute in the order they appear
question
Decision structure
answer
specific action(s) performed only if a condition exists
question
Single alternative decision structure
answer
provides only one alternative path of execution
question
Boolean expression
answer
expression tested by if statement to determine if it is true or false
question
Relational operator
answer
determines whether a specific relationship exists between two values
question
Dual alternative decision structure
answer
two possible paths of execution
question
String comparisons are case sensitive
answer
True
question
Strings can be compared using >, <, >=, and <=
answer
True
question
Strings can be compared using the == and != operators
answer
True
question
if-elif-else statement
answer
special version of a decision structure
question
Logical operators
answer
operators that can be used to create complex Boolean expressions
question
The and Operator
answer
Takes two Boolean expressions as operands
question
The or Operator
answer
Takes two Boolean expressions as operands
question
Short circuit evaluation
answer
deciding the value of a compound Boolean expression after evaluating only one sub expression
question
The not Operator
answer
Takes one Boolean expressions as operand and reverses its logical value
question
Boolean variable
answer
references one of two values, True or False
question
Flag
answer
variable that signals when some condition exists in a program
question
Which logical operators perform short-circuit evaluation?
answer
or, and
question
Short-circuit evaluation is performed with the not operator.
answer
False
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New