1/22
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Operator
A symbol that performs mathematical or logical operations on variables or values (operands) and returns a result.
Addition Operator (+)
Adds two values and returns their sum.
Subtraction Operator (-)
Subtracts the second value from the first and returns their difference.
Multiplication Operator (*)
Multiplies two values and returns their product.
Division Operator (/)
Divides the first value by the second and returns their quotient as a float.
Floor Division Operator (//)
Divides one value by another and returns the quotient rounded down to the next whole number.
Modulus Operator (%)
Divides one value by another and returns the remainder.
Exponentiation Operator (**)
Raises the first value to the power of the second value.
Logical Operators
Operators used to combine or modify conditional statements, including 'not', 'and', and 'or'.
Logical 'not' Operator
Inverts a Boolean value; converts True to False and False to True.
Logical 'and' Operator
Evaluates to True only if both conditions on either side are True.
Logical 'or' Operator
Evaluates to True if at least one of the conditions is True; returns False only if both are False.
Logical Operator Precedence
The order of execution for logical operators in Python
Relational Operators
Operators used to compare two values, such as ==, !=, >,
Conditional Statements
Also known as decision-making statements, these control the flow of execution by running specific code blocks based on whether a condition is True or False.
If Statement
A conditional statement that evaluates a Boolean expression and executes its indented block of code only if the condition is True.
If-Else Statement
A conditional statement where the 'if' block executes if the condition is True, and the 'else' block executes if the condition is False.
Elif Statement
Short for 'else if', it allows checking multiple sequential conditions and executes its block as soon as a True condition is found.
Cascade
A sequence of subsequent if-elif-else statements used to test multiple conditions in order.
Nested Conditional Statements
An 'if' or 'if-else' statement placed inside another 'if' or 'else' block to check sub-conditions.
Indentation in Python
The use of leading spaces (standardly 4 spaces) to define blocks of code in structures like conditionals and functions instead of using curly braces.
Suite
A group of individual statements that form a single code block under a header line (such as in an if statement).
Pass Statement
A placeholder statement used in empty code blocks (like an 'if' body) to prevent syntax errors when no code needs to be executed.