1/20
Looks like no tags are added yet.
Boolean
A data type that has two possible values: True and False.
Truthy Value
A value that evaluates to True in a conditional context.
Falsy Value
A value that evaluates to False in a conditional context.
Comparison Operators
Operators that compare two values and return a Boolean result, such as ==, !=, >,
if Statement
A control structure that executes a block of code if its condition evaluates to True.
else Statement
A control structure that executes a block of code if the preceding if condition evaluates to False.
elif Statement
A control structure that provides an additional condition to test if the preceding if condition was False.
Logical Operators
Operators that combine conditional statements: and (both must be True), or (at least one must be True), not (inverts the Boolean value).
Ternary Operator
A concise way to write an if-else statement in a single line, formatted as: value_if_true if condition else value_if_false.
Operator Precedence
The rules that determine the order in which operations are performed in expressions.
Nested Decisions
When an if statement contains another if statement within its block, requiring multiple conditions to be checked.
Chained Decisions
Multiple if statements joined with elif, allowing for more than two possible execution paths.
SyntaxError
An error that occurs when the code is not properly formatted according to Python syntax rules.
IndentationError
An error that occurs when there is inconsistent or incorrect use of indentation in Python.
Control Flow
The order in which individual statements, instructions, or function calls are executed in a program.
bool() Function
A built-in function that converts a value to a Boolean (True or False) based on its truthiness.
Type Casting
The process of converting one data type into another, such as converting a string to an integer.
Execution Path
The specific sequence of executed code based on conditional tests.
Input Conversion Trap
The scenario where input from the user is treated as a string, even if it represents a number, unless explicitly converted.
Boolean Evaluation.
Determining the truth value of an expression using Boolean logic.
Short-Circuit Evaluation
The process where Python evaluates conditions only as far as necessary, stopping early if the result is determined.