1/24
A comprehensive set of vocabulary flashcards covering basic Python syntax, data types, errors, arithmetic operators, and control flow based on the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Comment
A note in Python code for humans to read. Comments start with # and are ignored when the program runs.
print()
A Python function that displays text or values as output.
Variable
A name that stores a value so the program can use it later.
Variable assignment
Using = to store a value in a variable, such as message_string = "Hello there".
Literal value
The actual value written directly in code, such as "Welcome Home" or 3.
Error
A mistake Python finds when trying to run code.
SyntaxError
An error caused by code written in a way Python cannot understand, such as missing punctuation or an extra parenthesis.
NameError
An error caused when Python sees a name it does not recognize, often because a variable was not defined or was typed differently.
int
An integer: a whole number with no decimal point, such as −2, 0, or 15.
float
A floating-point number: a number with a decimal point, such as 2.1 or 98.6.
ZeroDivisionError
The error Python raises when code tries to divide by 0.
Expression
A combination of values, variables, and operators that Python can evaluate.
**
Python's exponentiation operator, used to multiply a base number by itself for a specified power.
Modulo operator
The % operator, which returns the remainder after division.
String concatenation
Combining two or more strings into one new string using the + operator.
str()
A function that converts another value, such as a number, into a string.
+=
The plus-equals operator, a shorthand used to add to or append onto the current value of a variable.
Triple quotes
Three quotation marks, either """ or ''', used to begin and end a multi-line string.
Control flow
The order in which Python executes code and decides which blocks should run.
Boolean expression
A statement that can be evaluated as either True or False.
Relational operator
An operator that compares two values and returns True or False, also known as a comparison operator.
==
The equal-to comparison operator that returns True if both operands have the same value.
bool
Python's data type for Boolean values (True or False).
if statement
A conditional statement that runs an indented block of code only if its condition is True.
and
A Boolean operator that returns True only if both connected expressions are True.