1/32
Flashcards covering key vocabulary and concepts from computer science lectures, including digital representation, searching algorithms, Python basics, and string manipulation.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Binary Digits (bits)
0 or 1; can be used to represent information.
Pixels
Picture elements; elements of a digital image arranged in a rectangular grid.
Image Resolution
Number of pixels in a digital image; higher resolution means higher quality and detail but requires more storage space and processing effort.
Color Depth
Fixed number of binary digits used to represent each pixel's color; higher color depth means more colors available and better quality, but requires more storage space and processing effort.
RGB Colors
Colors usually represented in 24 bits, with 8 bits each to specify the quantity of red, blue, and green.
Representation Size (Image)
Number of bits required to represent an image: resolution (rows x columns) x color depth.
Sampling Rate (Sound)
Number of samples per second, typically 44100 samples per second.
Sample Size (Sound)
Number of bits recorded per sample, typical value is 16 bits per sample.
Representation Size (Sound)
Total number of bits required for a piece of sound: sampling rate x sample size x duration x channels.
Linear Search
Starts at the beginning of the list and looks into each item until it finds what you’re looking for or reaches the end of the list.
Binary Search
Find the middle one, see if it’s more or less, then half the list and repeat until the item is found or reaches the end of the list.
Variable
A named location in the computer memory in which you can temporarily store data that your computer may need
Comments (Python)
Useful to document your program and make it easier to understand; they start with a # symbol, appear in green, and do not affect how the program runs.
Functions (Python)
Special routines that do a specific job; examples include print() and input().
String (Python)
Data type that holds alphanumeric data as text.
Integer (Python)
Data type that holds whole numbers.
Float (Python)
Data type that holds numbers with a decimal point.
Boolean (Python)
Data type that holds either “true” or “false”.
Casting (Python)
Manually defining or changing the data type of a variable using functions like str(), int(), and float().
and (Boolean operator)
Returns True if both operands are True, otherwise returns False.
or (Boolean operator)
Returns True if at least one of the operands is True, otherwise returns False.
not (Boolean operator)
Returns the opposite of the operand's Boolean value.
IF statement
A selection statement that forces a decision based on a condition.
ELIF statement
Stands for Else, If and gives you more options in an if statement.
Algorithm
A sequence of steps or instructions which we can use to solve a problem or to complete a task
WHILE loop
A set of instructions that repeats again and again until the condition is false.
len() function
Returns the number of characters in a string.
String Slicing
Extracts a portion of a string.
find() method
Locates the index of a substring.
Lists
Created using square brackets [], with elements separated by commas. Elements are listed by index starting from 0
Concatenation
Combines strings using the + operator or join() method.
operators (python)
Addition +
Subtraction -
Multiplication *
Division /
Floor division (integer division) //
Remainder (modulus) %
Comparison operators
Equal to ==
Not equal to !=
Greater than >
Less than <
Greater than or equal to >=
Less than or equal to <=
assignment operators
used to assign value to variables, eg=