1/12
A set of vocabulary flashcards defining key terms and concepts related to Python Boolean expressions, operators, precedence rules, and pseudocode syntax.
Boolean Expression
An expression that evaluates to exactly one of two Boolean values: True or False.
Selection
A programming structure, such as an if statement, that runs code only when its condition evaluates to True.
Relational Operators
Operators used to compare two values in Python, including ==, !=; >; <; >=; and <=; which evaluate to True or False.
Assignment Operator (=)
An operator that stores a value in a variable (for example, score=85 means score receives 85).
Equality Operator (==)
A relational operator in Python that checks whether two values are equal, returning True or False.
Case Sensitivity in String Comparisons
The rule in Python where string comparisons evaluate both characters and capitalization (for example, "AP CSP"=="ap csp" evaluates to False).
Logical Operators
Operators in Python (and, or, not) used to combine or reverse Boolean conditions.
and Operator
A logical operator that requires both conditions to be True for the result to be True.
or Operator
A logical operator that returns True if at least one condition is True, and returns False only when both conditions are False.
not Operator
A logical operator that reverses a Boolean value, turning True to False and False to True.
Operator Precedence
The required order for evaluating expressions in Python: Parentheses (), followed by comparisons, NOT, AND, and finally OR.
De Morgan's Laws
Rules of logical equivalence stating that not(A and B) is equivalent to (notA) or (notB), and not(A or B) is equivalent to (notA) and (notB).
AP CSP Pseudocode Assignment Symbol (←)
The arrow symbol (←) used in AP CSP pseudocode to assign a value to a variable, reserving = exclusively for equality comparisons.