1/90
Looks like no tags are added yet.
line of code
a single instruction for the computer to perform
program
an independent collection of lines of code that serves one or more overall functions
input
data that is fed into a program for it to operate upon
output
what the computer provides in return after running some lines of code
compile
to translate human-readable computer code into instructions the computer can execute
execute
running some code and having it actually perform its operations
console
an output medium for a program to show exclusively text-based output
graphical user interface (GUI)
an output medium that uses more than just text, like forms, buttons, tabs, and more
computing
the basic principles of working with computers
programming
writing code through an iterative process of writing lines of code, attempting to execute them, and evaluating the results
debugging
resolving problems in code, whether it be errors thrown in compilation or running or mismatches between the desired and observed output
output some text to the console
boolean
a simple true or false value
compilation errors
errors that occur during the computer's read through of the code
runtime errors
errors that arise when trying to actually execute the code
nameError
an error that usually occurs when you use a variable name that doesn't yet exis
typeError
an error that occurs when we try to perform an operation on an object that doesn't make sense with the operation
attributeError
an error occurs when we ask for information about a variable that doesn't make sense
syntaxError
an error that occurs when the line of code we've written can't be read by the computer because it doesn't match the computer's expectation for the programming language's grammar
print debugging
a form of debugging where print statements are added throughout the code to check how the program is flowing
scope debugging
a form of debugging where print statements are added to check the status of the variables in the program at different stages to see how they are changing
rubber duck debugging
a form of debugging where the programmer explains the logic, goals, and operations to an inanimate listener to methodically step through the code
function
a segment of code that performs a specific task, sometimes taking some input and sometimes returning some output
method
a function that is part of a class in-object oriented programming (interchangeable with function)
object-oriented programming
a programming paradigm where programmers define custom data types that have custom methods embedded within them
event-driven programming
a type of programming where the program generally awaits and reacts to events rather than running code linearly
comments
notes from the programmer supplied in-line alongside the code itself, designated in a way that prevents the computer from reading or attempting to execute them as code
documentation
collected and set-aside descriptions and instructions for a body of code
self-documenting code
code whose variables and functions are named in a way that makes it clear what their underlying content and operations are to the reader
variables
alphanumeric (letters and numbers) identifiers that hold values, like integers, strings of characters, and dates
value
the content of some variable
null
the "value" a variable has when it doesn't actually have a value
data type
the type of content a variable holds, like an integer or a string of characters
str(variable)
takes as input some variable and returns a string representation of the variable's value
int(variable)
takes as input some variable (usually a string) and attempts to convert it to an integer, returning the integer if successful or raising a valueError if unsuccessful.
bool(variable)
takes as input some variable (usually a string) and attempts to convert it to a boolean, returning the boolean value if successful or raising a valueError if unsuccessful
float(variable)
takes as input some variable (usually a string) and attempts to convert it to a float, returning the float if successful or raising a valueError if unsuccessful
operators
specific, simple functions that act on primitive data types, like integers and strings
mathematic operators
operators that perform mathematical functions, such as adding two numbers together
logical operators
operators that perform logical operations, such as comparing relative values
relational operators
operators that check the relationships between multiple variables
numeric comparison operators
operators that facilitate numeric comparison between values (>, >=,
non-numeric equality comparisons
any kind of data, that is not numerical, that you can compare for equality
set operators
check to see if a value is a member of a set of multiple values
boolean operators
operators like "and" and "or" that act on pairs of boolean value, or that act on single boolean values like "not"
and
an operator that acts on two boolean values and evaluates to "true" if and only if both are true
or
an operator that acts on two boolean values and evaluates to "true" if and only if at least one is true
not
an operator that acts on one boolean value and evaluates it to the opposite value
truth tables
tables that map out the results of a statement in boolean logic, depending on the values of the individual variables
assignment operator
an operator that takes the output of an expression and assigns it to a variable
modulus
the remainder function, returns the remainder of one number divided by another
len( )
a function that takes as input a variable with a length, such as a string of characters or a list of items, and returns its length
self-assignment
a common programming pattern where a variable is assigned to the output of an expression that included the variable itself
increment
repeatedly adding a constant, typically one, to a variable
control structures
lines of code that control when other lines of code run
conditional statements
programming statements that control what code is executed based on certain conditions; usually of the form "if", "else if", and "else"
loop
a programming control structure that executes a segment of code multiple times
exception
an error that a program might want to anticipate and catch instead of outright avoiding
exception handling
a control structure that catches certain anticipated errors and reacts to them accordingly
indentation
spaces at the beginning of a line that are used to group together blocks of code. All consecutive lines of code at the same level of indentation are in a single code block
scope
the portion of a program's execution during which a variable can be seen and accessed
if-then statement
a conditional control structure that runs a block of code only if a certain condition is true
else statement
a conditional control structure that runs a block of code if all preceding if-then and else-if statements have been false
else-if statement
conditional control structure that runs a block of code if all preceding if-then and else-if statements have been false and some other conditions are met
nested conditional
a conditional statement that is itself controlled by another conditional statement
for loop
a loop control structure that runs a block of code a predetermined number of times
iteration
a single execution of a repeated task or block of code
while loop
a loop control structure that runs a block of code until a certain logical expression is satisfied
loop control variable
a variable whose value is the number of times a loop has run (used to check if the loop should keep running)
range(begin, end)
takes as input two variables, a first number and a last number, and provides the list of numbers for a for loop to iterate over
zero-indexing
first item in the sequence in the list is item 0
for-each loop
a loop control structure that runs a block of code a predetermine number of times, where the number of times comes from the length of some list and the items in the list are automatically loaded into a variable for usage in the block of code
iterate
to repeat code a number of times
continue
skip the rest of the current iteration of the loop and continue with the next iteration of the loop
break
skip the rest of the current iteration of the loop and break out of the loop altogether
pass
designate an 'empty' body for a control structure
function call
a place where a function is actually used in some code
function definition
a segment of code that creates a function, including its name, parameters, and code, to be used by other portions of a program
parameter
a variable for which a function expects to receive a value when called
function header
the name and list of parameters a function expects
function body
the code that a function runs when called
return statement
the line of code that defines what output will be sent back at the end of a function
arguments
values passed into parameters during a function call
parameter mismatch
we gave a function more or fewer parameters than it expected
scope error
we tried to use a variable in a function that was created outside the function or vice vers
keyword parameters
special kind of optional parameter to which the program may choose to assign an argument during a function call, or may ignore
catching errors
using error handling to prevent a program from crashing when an error is encountered
uncaught error
an error that is not handled by error handling code, and thus usually forces the program to crash
try statement
a control structure that sets aside a block of code in which an error might occur so that the computer will look for error handling capabilities
except statement
a control structure that designates what error it anticipates in a try block and provides the code to execute if that error arises
finally statement
a control structure that designates some code to run after a try and catch structure regardless of whether or not an error arose