Fundamentals Flashcards
Expression
A unit of code that can be evaluated into one value
Statement
A unit of code that is used to execute a change
Variable
A name that is a reference to a specific place in memory, and the value stored there. Variables can be assigned and reassigned values.
Literal
A value that is the value itself.
Integer
Represents an integer! A whole number that is positive, negative or zero.
Float
Represents a number that isn’t whole; it is fractional, or has a decimal place.
String
Represents text, specifically with an ordered sequence of characters.
Boolean
Represents True or False
None
Represents the concept of no value, or the absence of a value.
List
An ordered list of values. Items in the list are sometimes called elements. Lists start at index 0. Can get the value of an item by using square brackets and the index of the item.
Dictionary
An unordered collection of key-value pairs. Can access values in the dictionary by using square brackets and the name of the key.
Range
A sequence of numbers between a start, stop, and incrementing by a step.
Tuple
An ordered, unchangeable collection of items.
Set, frozenset
An unordered collection. Cannot access values with index or key; must use a loop.
bytes, bytearray
A collection of binary digits (bits).
Conditional Expression
An expression that evaluates to either truthy or falsy, typically used in order to determine if a conditional requirement is met. Usually used with if statements.
Truthy
A value that is considered True inside a conditional expression, even if it is not literally True.
Falsy
A value that is considered False, even if it is not literally False.
Function
Lines of code (1 or more) that are related, grouped together, and named. Once defined, these lines of code are reusable and can be called over and over again.
Invoking a function
“Invoking a function” means “make the lines of code inside a function definition happen now.” We can invoke a function any number of times (even infinitely!).
Function definition
How a function gets defined before it gets invoked
Function Signature
A piece of syntax. A part of the function definition that determines function name and the parameter list
Parameter
The name of an expected argument for this function. This parameter name is the name of the local variable that will hold an argument value. Parameters and arguments at the time of function call are mapped positionally.
Documentation
Any written text, illustrations or video that describe a software or program to its users.