Variables and Expressions Flashcards
Variable
Named item that holds a value
Assignment Statement
Assigns a value to a variable
x = 5
Incrementing
Increasing a variables value by 1
x = x + 1
Identifier
Name that uses letters, underscores, and digits. Cannot start with a digit.
Reserved Words
Part of the language and can’t be used as identifiers
aka Keywords
PEP 8
Python Enhancement Proposal
Python style guide
Object
Represents a value and is automatically created when interpreter executes a line of code
Garbage Collection
Automatic process of deleting unused objects
Name Binding
Process of associating names with interpreter objects. Happens with assignment statements.
Mutability
Indicates whether the object’s value is allowed to change
Identity
Unique numeric identifier of an object. Usually refers to memory address.
Overflow
When value is too large to be stored in memory allocated by interpreter
Expression
Combination of variables, literals, operators, and parentheses that evaluates to a value
Literal
Specific value
2
Operator
Symbol that performs a built-in calculation
+