Units 1-5 Flashcards
(70 cards)
Iterative development process
develop working prototypes of a program and then go back and re-develop it
incremental development process
break apart a problem into small parts and reassemble the solution when all the parts are fixed
program documentation
shows how your a part of your program works
comments
program documentation written directly into the program
logic error
error in program’s output.
Code executes but output is not what the programmer intended
syntax error
code doesn’t work because it was written incorrectly
runtime error
error while code is running
overflow error
error in code because numbers are too big for computer
hand-tracing (methods of fixing)
manually tracking variables outputs as the program goes along
print statements (methods of fixing)
print out values to make sure they are correct
Data is stored in bits
bits (binary digits - composed of 0s and 1s)
single digit
Binary numbers
8 bits = 1 byte
if n = number of bits,
2^n = can store 2^n numbers
2^n -1 = shows the largest number it can store
Data representation:
ASCII code
Analog data
Digital data
ASCII code- converts text to binary code
Analog data- infinite details that are continuous and change smoothly over time
Digital data- measured digitally and leaves out extra data by simplifying data collected (form of abstraction)
sampling: when you break up analog data in intervals with the goal of putting it back together at a desired quality. Smaller samples = more accurate, fewer bits = less accurate
Abstraction
reducing complexity by only focusing on most important parts and hiding irrelevant parts from user
focus on content without worrying about how application works
Lossy data compression
Can reduce file size and decrease resolution but lost data CANNOT be recovered. Easier to store and transmit
lossless data compression
no data is lost and files can be reproduced. big file sizes so difficulty storing and sending
metadata
- data that describes your data.
- ex: data - picture of waterfall, metadata- time and location where pic was taken.
- changing metadata will not change primary data
- metadata provides additional info for better usage
data mining
examining large sets of data for information
transforming data
converting, cleaning, structuring data to format it in a way that helps analyze data for organizations
cleaning data
correcting, editing data so its prepared to be analyzed
Strings (data types)
- substrings
- string concatenation
- strings are an ordered list of characters (“hello”)
- substrings are part of a string (“ello”
- string concatenation is when you combine two or more strings with ‘+’
Lists (data types)
- ordered sequence of elements starting with index 1
- if index is less than 1 or greater than the number of elements in the list, it will cause error
Boolean operators (data types)
- only true/false with 3 data operators (NOT, AND, OR)
- NOT: if condition is false, NOT false evaluates to true (opposite)
- AND: evaluates to true only if both condition 1 and condition 2 are true, otherwise false
- OR: evaluates to true if at least 1 condition is true, if both are false, it is false
algorithm
- sequence of instructions that accomplish a certain task; uses sequencing, selection, iteration