1/28
Vocabulary flashcards for reviewing Python syntax and data types.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Dynamic typing
Variables do not need a declared type; the type is determined at runtime based on the assigned value. The same variable name can refer to different types over time
int
Whole numbers
float
Floating point value — all numbers
str
Characters
bool
Logical — True or False
Valid variable names
Must start with a letter or underscore; can contain letters, digits, and underscores; cannot contain spaces or special characters.
operator +
Addition
operator -
Subtraction
operator *
Multiplication
operator /
Division (always returns float)
operator //
Integer (floor) division. Rounds down to the nearest whole number
operator %
Modulo (remainder). Gives the remainder after division; useful for patterns, checking even/odd, or cycling through options
operator **
Exponentiation
operator ==
Equal to
operator !=
Not equal to
operator <
Less than
operator <=
Less than or equal to
and
True if both are True
or
True if at least one is True
not
Inverts the Boolean value
Truth table
Used to show all possible outcomes of logical expressions, helping visualize how operators behave depending on input values (True or False).
Short-circuiting
Refers to how logical operators like 'and' and 'or' stop evaluating expressions as soon as the result is known.
Order of operations / Operator precedence
Determines the order in which expressions are evaluated. PEMDAS.
Is Python case senstive?
Yes
operator >
Greater than
operator >=
Greater than or equal to
Concatenation with +
Combines strings. “hello” + “world” => “hello world”
Repetition with *
Repeats the string. “a” * 3 => “aaa”
Membership with in
Checks if a substring is present. “cat” in “scatter” => True