Algorithms

Cards (22)

  • What is an algorithm? = an algorithm is the step-by-step instructions followed to solve a problem.
  • Pseudocode is a kind of structured English for describing algorithms. It is a generic code-like language that can be easily translated into any programming language.
  • Sequence: Following instructions in a set order. This can be broken down into sub-tasks.
  • Selection: Making decisions - a question is asked and depending on the answer the program takes one of two courses of action.
  • Iteration: When a task is repeated until a required outcome or repeated a certain amount of times.
  • Sub-tasks are the smaller steps of a sequence.
  • Decomposition is to break down a problem into smaller and smaller sub-tasks.
  • Why is decomposition important? = It’s important because it's easier to solve a small problem compared to a large one.
  • What symbol is used to represent Start or End?
  • What symbol is used to represent the input or output of data?
  • What symbol is used when a decision has to be made?
  • What symbol is used to represent when a process must be carried out?
  • What is an operator? = An operator is a symbol that tells the computer to perform a specific action on some data.
  • What is an operand = An operand is the data on which it performs the action on.
  • Modulus returns the remainder.
  • Division such as 13/3.
    13 is called the dividend
    3 is called the divisor
  • The quotient is the number of times the divisor divides into the dividend
  • The DIV operator returns the quotient.
  • ^ is called a ‘caret’ and represents exponentiation and refers to ‘powers of’.
  • switch/case is another method that can be used for selection.
  • Boolean operators are NOT, AND, OR, NAND, and NOR
  • Boolean operators are often referred to as Logic operators