Representing algorithms

Subdecks (1)

Cards (23)

  • Algorithms are a sequence of steps that can be followed to complete a task.
  • Decomposition is breaking down a problem into a smaller number of subproblems so that each sub problem accomplishes a task. You can do this by:
    • identifying the main problems
    • List the main subproblems
    • Breaking these down into smaller subproblems
  • A flowchart is a graphical representation of an algorithm, it shows how data flows through a program using symbols such as circles (start/end), rectangles (processes) and diamonds (decisions).
  • Pseudocode is similar to programming code but uses English words instead of actual commands. It helps with understanding what needs to happen without having to write out all the details.
  • The four types of pseudocode statements are assignment statement, decision structure, repetition structure and procedure call.
  • The purpose of pseudocode is to describe the logic of an algorithm without worrying about syntax errors or other implementation details.
  • Repetition structures repeat instructions until certain criteria have been met.
  • Decision structures allow us to make decisions based on conditions being met or not.
  • Abstraction is the process of removing unnecessary details from a problem to simplify it.
  • Assembly language and machine code are low-level languages. Each line of assembly language is equivalent to one line of machine code. High level languages can be translated using a complier as an interpreter.
  • A compiler translates high-level programming languages into machine code that computers can understand.
  • Compiled programs run faster than interpreted ones because they don't need to wait for every instruction to be executed by the computer.
  • IDEs (integrated development environments) were created to give programmers all the tools they need to write programs in one place. They allow you to write, run and debug code without having to switch programs.
  • Error message
    Used to find errors in your program. They pinpoint lines of code that contain errors and provide details about them.
  • Interpreter
    Translates and executes code line by line. Translates code into machine readable code.
  • Logic error

    Program will run, but won't do what the programmer expected. This is hard to spot as it is not picked up by the IDE.
  • Subroutine
    A sequence of instructions to perform a specific task under an identifiable name
  • Syntax error
    An error where the code has been structured incorrectly and syntax rules haven't been followed