1/33
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Expression
a combination of items, like variables, literals, operators, and parentheses
Literal
a fixed value used in code, such as a number, string, or boolean that is directly written in the program
Operator
a symbol that tells the interpreter to perform specific mathematical, logical, or relational operations on operands.
value
a specific piece of data that can be stored in a variable or used in an expression, such as a number, string
float
a data type in Python used to represent real numbers that include a decimal point. It can represent both positive and negative numbers.
integer
a data type in Python used to represent whole numbers, both positive and negative, without any fractional component.
string
a data type in Python used to represent a sequence of characters, often enclosed in single or double quotes. Strings can include letters, numbers, and symbols.
evaluates
describes the process of determining the value of an expression or code in Python, executing it to produce a result.
precedence rules
the guidelines that determine the order in which different operations are evaluated in an expression. They dictate which operations take priority over others, affecting how the expression is calculated. These rules influence the outcome of expressions involving multiple operators, ensuring correct and expected calculations.
unary minus
an operator indicating that a number should be treated as negative, effectively changing its sign. In Python, this operator is often applied to numeric types for arithmetic operations. It allows the negation of a value, making it useful for expressions requiring negative numbers.
compound operators
operators that combine an arithmetic operation with assignment, allowing for more concise code. An example is +=
, which adds a value to a variable and assigns the result back to that variable.
function
a block of reusable code that performs a specific task. Functions help organize and structure code, allowing for modular programming by enabling the grouping of related operations under a single name and invoking them as needed.
function definition
a description of the input parameters and outputs for a specific function, outlining its purpose and usage within a program.
function call
the action of invoking a defined function in a program by specifying its name and providing the necessary arguments. This executes the code within the function and returns any output.
return statement
a special statement in a function that exits the function and optionally sends a value back to the caller, allowing the function to produce output.
None
a keyword in Python used to exit a function and return a value to the caller, enabling the function to produce output based on its operations.
OR
special keyword that indicates no value
parameter
a function input specified in a function definition
argument
a value provided to a function's parameter during a function call
assignment
the process of assigning a value to a variable in Python, allowing the storage and retrieval of data
prompt
a message displayed to ask the user for input, often used in functions to guide user interaction
interpreter
a program that reads and executes Python code line by line, allowing for immediate feedback and debugging.
code
a common word for the textual representation of a program
variable
a named storage location in memory that can hold different values during program execution, allowing for data manipulation and retrieval.
new line character
a special character used in programming to indicate the end of a line and the start of a new line, typically represented as '\n' in Python.
escape sequence
a series of characters that represent a special character in a string, allowing for formatting and control sequences, such as '\n' for new lines and '\t' for tabs in Python.
whitespace
any character or sequence of characters that represent horizontal or vertical space in text, such as spaces, tabs, and new lines, which can impact the formatting of strings in Python.
type
a classification that defines the nature of data in Python, determining how it can be used, such as integers, strings, lists, and more.
input()
a built-in function in Python that receives input from the user as a string, allowing for interactive user communication during program execution.
syntax error
an error that occurs when the code does not conform to the rules of Python's syntax, preventing the program from executing properly.
logic error
a mistake in a program that produces incorrect or unexpected results due to flaws in the program's logic, rather than a syntax issue. a common type of error that does not stop program execution but leads to incorrect outcomes, often making it harder to identify and fix.
ValueError
|
TypeError
An operation uses incorrect types, which can occur if adding an integer to a string.
NameError
the program tries to use a variable that does not exist.
IndentionError
Occurs when the indentation of code blocks in Python is inconsistent or incorrect, leading to a syntax issue.