Paper 2

Cards (82)

  • Algorithms are a sequence of steps that can be followed to complete a task.
  • Algorithmic thinking is the process of solving problems by defining these steps and the sequence needed.
  • Program code is the implementation of an algorithm.
  • Pseudocode and flowcharts are ways to represent algorithms.
  • Pseudocode is similar to code but is often a bit more relaxed.
  • Flowcharts use a set group of symbols to represent the steps in an algorithm.
  • The start and end symbol in a flowchart represents the start and end of an algorithm.
  • A sub program in a flowchart is a group of related steps.
  • Trace tables show how values change when an algorithm is carried out.
  • When filling in a trace table, only add to a column when that particular column's value changes.
  • High level languages are more readable, easier to code in, portable, and can run on many CPUs, but they are slower and need translators.
  • Compilers produce an executable file when the translation is finished, which can be run without source code.
  • A translator is a program that converts one language to another.
  • Negation, also known as conjunction and disjunction, is a topic in logic.
  • There are two types of programming languages: high level and low level.
  • Low level languages, such as assembly code and machine code, are slower but offer more control and can be optimized for speed.
  • Interpreters work by translating an instruction and running it straight away, which can be frustrating for users as they don't see the source code until the program is executed.
  • Integrated development environments provide features such as an editor, syntax highlighting, debugging tools, and a runtime environment.
  • While Loops repeat until a condition is broken and they're called condition control Loops.
  • Arrays can get trickier because you can have 2D arrays which are useful for representing tables.
  • If statements are always checked and they look like this in the exam reference language: if price is set to 50, both premium and standard would get outputted because 50 is both bigger than 30 and 20.
  • If statements can have elseifs and else's.
  • E-lifts or lcfs in reference language are only checked if previous conditions were false.
  • Do until Loops or do while Loops repeat until a condition is met and they're also called do while Loops.
  • Condition control Loops repeat until a condition is met and they're called condition controlled Loops.
  • Subprograms, also called subroutines, are named out of line blocks of code.
  • When moving on to a new row in a trace table, it's generally because you're moving into a new block of code.
  • Loops can repeat a set number of times and they're called count controlled Loops.
  • Switch statements are useful where a variable determines the selection.
  • In a 2D array, the first number in the index refers to which array within the array it is, for example, index one in the above 2D array refers to the first array, not the second.
  • If there is an Asterix in SQL, it means select all.
  • A 2D array is an array of arrays, for example, a 2D array that matches a table could look like this:
  • Bingo row select has three parts to it: select for fields from the table, where the condition is whatever the condition is.
  • In the example of selecting the exam code and the exam length from the exams table, only where the exam length is less than 130 minutes, it would give two records because only the first two records have an exam length of less than 130.
  • The second number in the index refers to which element within that particular array, for example, index 2 in the above 2D array refers to the second element, not the first.
  • Gaps in a trace table are usually fine.
  • Local variables exist only when the subprogram is executing and are only accessible inside of a sub program.
  • Parameters are variables used as inputs to a subprogram.
  • An array is an organized collection of items of the same data type and generally has a fixed or static length.
  • Indexing is a method where a number is used to refer to a particular item in an array, with the first item starting at zero.