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.
None
Represents the concept of no value, or the absence of a value.
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.
Software
Software is a collection of instructions for a computer to execute
Application
Software designed for an end-user
Source Code
Code that builds software and is readable to a human
Open Source (OSS)
Source code that is available to view and use
Local Machine
Your own very computer in front of you
RAM
RAM is considered “random access” because you can access any memory cell directly if you know the row and column that intersect at that cell.
SAM
The opposite of RAM is sequential access memory (SAM). SAM stores data as a series of memory cells that can only be accessed sequentially (like a cassette tape).
interface
A medium that takes information from one source, and passes it to another source.The interface usually makes a meaningful translation between the two sources.
root directory
The nickname of the top-most folder that exists on the machine. This folder can contain folders important to the whole system, including folders and files and programs needed to start, sleep, or run a computer.
shell
A shell is a program that runs commands. It is the program that works between the command line and the computer’s operating system, and runs our programs.
home directory
“Home directory” is the nickname of the user folder on a computer, contains important system-wide configuration files for certain programs, by default in macOS, has folders such as “Documents,” “Pictures,” “Application,” “Desktop”.
CPU
At the heart of a computer is the CPU, or Central Processing Unit.
Storage
Storage where data can be kept for the long-term. A common example of this is a hard disk drive in a computer.
Pseudocode
An informal code style intended to give explanation and meaning.
Syntax Error
An error caused by incorrect syntax that Python cannot interpret
Runtime Error
An error raised during runtime
Logical Error
An error caused by incorrect logic
Stack Trace
A report of the active stack frames at a certain point in time during the execution of a program. Reports error messages and details about that error
Debugging
The process of identifying and removing errors from computer hardware or software
Rubber Ducking
Method of debugging code. It describes the idea that sometimes the best way to debug code is to talk things through out loud, and that sometimes talking out loud to a rubber duck will do.
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”(call a function) means “make the lines of code inside of 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 def, where the function is defined, a function you wrote.
Single Responsibility Principle
The Single Responsibility Principle (SRP) states that a function should have one, and only one primary responsibility. This is to say, when developers describe the purpose of a function, ideally, the function isn’t trying to do more than one thing.