Unit 2

  • Bits: Amount of digits in binary (ex: 4 bits=0000)
  • Bytes: A group of binary bits (usually 8: 1 byte=00000000)
  • Hexadecimal: Base 16 counting system, includes numbers 0-9 and letters A-F
    • 24-bit hexadecimal is used to code for colors in CSS/HTML
    • For example, the hex code for the background of my fastpages is #08002c
  • Nibble: 4 bits of binary, or half of a byte
  • Binary Numbers:
    • Unsigned integer: often called “uints”, always non-negative (zero or positive)
    • Signed integer: can be positive, negative, or zero
    • Floating point: numerical values which can be represented by a fractional or decimal value (as opposed to integer, which cannot represent fractions)
  • Binary Data Abstractions:
    • Boolean: binary variable having two possible outcomes “true” or “false”
    • ASCII: American Standard Code for Information Interchange, character encoding standard which represents characters in a consistent and standardized way across all computers
    • Unicode: Another encoding standard which focuses on special texts from different languages and special symbols
    • Color model based on the amount of red, green, and blue being added together
  • Data Compression:
    • Lossy: unnecessary information is discarded
    • Lossless: original data can be perfectly reconstructed from compressed data

Unit 3

  • Variable: a named location in a computer’s memory that is used to store a value. The value stored in a variable can be changed, and the same variable can be used to store different values at different times.
  • Data types: the classification of data based on their type and the operations that can be performed on them. Common data types include integers, floating-point numbers, strings, and Booleans.
  • List: a collection of data items that are organized in a specific order. In Python, lists are represented using square brackets and can contain any data type, including other lists.
  • 2D list: list that contains other lists as its items. This allows for the creation of data structures that have more than one dimension, such as a grid or a table.
  • Dictionary: data structure that uses keys to map to values. In Python, dictionaries are represented using curly braces and can contain any data type.
  • Class: a template or blueprint for creating objects in object-oriented programming. Classes define the properties and behaviors of objects, and objects are instances of a class.
  • Algorithm is a step-by-step procedure for solving a problem or achieving a specific goal. Algorithms are used in many different fields, including computer science, mathematics, and engineering.
  • Sequence is a type of control structure in which a set of instructions are executed in a specific order.
  • Selection is a type of control structure in which a specific set of instructions are executed based on the evaluation of a condition.
  • Iteration is a type of control structure in which a set of instructions are repeated until a specific condition is met.
  • Expression: combination of variables, operators, and other elements that produces a value. In programming, expressions are often used in control structures to evaluate conditions.
  • Comparison operators: operators that are used to compare two values. In Python, the comparison operators include < (less than), > (greater than), == (equal to), and != (not equal to).
  • Boolean expressions: expressions that evaluate to either true or false. In programming, Boolean expressions are often used in control structures to determine which instructions to execute.
  • Selection statements: control structures that use Boolean expressions to evaluate conditions and decide which instructions to execute. In Python, the selection statement is the if statement.
  • Iteration statements: control structures that repeat a set of instructions until a specific condition is met. In Python, the iteration statements are the for and while loops.
  • Truth table: table that shows the possible combinations of inputs and outputs for a logical operation. Truth tables are often used to evaluate the behavior of Boolean expressions.
  • Characters: the basic building blocks of a string. In Python, characters are represented as single quotes (e.g. ‘a’) and can be any letter, number, or symbol.
  • Strings: collections of characters that are used to represent text. In Python, strings are represented as double quotes (e.g. “Hello”) or single quotes (e.g. ‘Hello’).
  • The length of a string is the number of characters it contains. In Python, the length of a string can be found using the len() function.
  • Concatenation: the process of joining two or more strings together to form a new string. In Python, concatenation is performed using the + operator.
  • The upper() and lower() methods are used to convert a string to all uppercase or all lowercase characters
  • Traversing a string: to access each character in the string one by one. In Python, this can be done using a for loop and the len() function to iterate over the characters in a string.
  • The if, elif, and else keywords are used in Python to create conditional statements.
  • If statement: used to evaluate a condition and execute a specific set of instructions if the condition is true.
  • Elif statement: used to evaluate additional conditions if the original if condition is false.
  • Else statement: is used to specify a default set of instructions to execute if all other conditions are false.
  • Nested selection statements: if statements that are placed inside of other if statements. This allows for the creation of complex conditional statements that can evaluate multiple conditions.
  • The for and while loops: used in Python to repeat a set of instructions multiple times. The for loop is used to iterate over a sequence of items, such as the elements of a list. The while loop is used to repeat a set of instructions as long as a specific condition is true.
  • Range() function: is used in Python to generate a sequence of numbers. This can be used in a for loop to specify the number of times to repeat the loop.
  • Break and continue keywords: used in Python to control the flow of a loop. The break keyword is used to exit a loop completely, while the continue keyword is used to skip the current iteration of the loop and continue with the next iteration.
  • Procedural abstraction: the process of separating the details of how a task is performed from the overall logic of the program. In Python, this is achieved using def procedures, which allow for the creation of reusable blocks of code that can be called from other parts of the program.
  • Parameters: variables that are used to pass information into a def procedure. When a procedure is called, the values of the parameters are specified and are used by the procedure to perform its tasks.
  • Return values: values that are returned by a def procedure after it has finished executing. Return values can be used by the calling code to access the results of the procedure’s operations.