3: Conditional Execution Flashcards
What is a Boolean expression?
An expression whose value is either True or False.
What is the body?
The sequence of statements within a compound statement.
Define branch…
One of the alternative sequences of statements in a conditional statement.
What is a chained conditional?
A conditional statement with a series of alternative branches.
What is a comparison operator?
One of the operators that compares it’s operands: ==, !==, , >=, and <=.
What is a conditional statement?
A statement that controls the flow of execution depending on some condition.
What is a condition?
The Boolean expression in a conditional statement that determines which branch executed.
What is a compound statement?
A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header.
What is a guardian pattern?
Where we construct a logical expression with additional comparisons to take advantage of the short circuit behavior.
What is logical operator?
One of the operators that combines Boolean expressions: and, or, and not.
What is a nested conditional?
A conditional statement that appears in one of the branches of another conditional statement.
What is a trace back?
A list of functions that are executing, printed when an exception occurs.
What is a short circuit?
When Python is part-way through evaluating a logical expression because Python knows the final value for the expression without needing to evaluate the rest of the expression.