1/60
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
int
whole number (no decimals)
float
number with decimals
str
text in quotes
bool
True or False
type()
function that tells you the type of a value
expression
code that evaluates to a value
evaluation
the process of computing a value
order of operations
()
concatenation
combining strings using +
repetition
repeating a string using * with an int
indexing
accessing a character using position starting at 0
index 0
first element in a sequence
len()
returns the length of a string or list
type conversion
changing a value from one type to another
int()
converts to integer (cuts off decimals)
float()
converts to decimal number
str()
converts to string
TypeError
error when operation is used on wrong types
function
reusable block of code that takes input and returns output
function definition
creating a function using def
function call
using a function with arguments
parameter
variable in function definition
argument
actual value passed into function
return
sends a value back and ends the function
None
default return value when no return is given
boolean expression
expression that evaluates to True or False
and
True only if both sides are True
or
True if at least one side is True
not
reverses True/False
conditional
if/else statement controlling flow
if
runs code when condition is True
else
runs code when condition is False
elif
checks another condition if previous is False
loop
repeats code multiple times
for loop
iterates over a sequence
range()
generates a sequence of numbers
while loop
repeats while condition is True
list
ordered collection of values
list indexing
accessing elements using positions
append()
adds item to end of list
list length
number of items in a list
dictionary
collection of key-value pairs
key
unique identifier in a dictionary
value
data associated with a key
accessing dict
using dict[key] to get value
updating dict
assigning new value to a key
deleting dict
removing a key-value pair with del
scope
where a variable is accessible
local variable
variable inside a function
global variable
variable outside all functions
scope error
trying to use a variable outside its scope
f-string
string with embedded expressions using {}
recursion
function calling itself
base case
condition that stops recursion
recursive case
part that calls function again
class
blueprint for creating objects
object
instance of a class
attribute
variable inside an object
method
function inside a class
self
reference to the current object
constructor
init method that initializes attribute