interpreting algorithms

Cards (13)

  • Syntax error
    Coding error where the rules of the language have been broken, e.g. a missing punctuation mark or keyword such as print(hello")
  • Runtime error
    Any error that occurs while the program is running, including division by zero and using an unknown variable
  • Logic error
    An error that occurs when code compiles and runs, but doesn't perform correctly. E.g. using > instead of >=. It is detected by systematic testing with a trace table
  • Test plan
    A plan for testing a program in a structured way. Includes test data and expected results. Proper testing with one of these can find logic errors and prevent runtime errors
  • Trace table
    A testing tool that finds logic errors. It records the values of variables at each point during execution, so you can see where the program code does something you didn't intend
  • Visual inspection
    Determining the purpose of an algorithm by looking over it and following the flow of control
  • Compiler
    Syntax errors will be found by this program, it checks the high-level code and translates it to machine code
  • Grammar
    Another word for syntax, it is the rules of a language. Writing code that does not follow these rules causes a syntax error
  • Terminal
    This shape starts and stops an algorithm
  • Process
    This shape is used for a process such as calculating or sorting
  • Decision
    This shape is used to perform selection based on a condition e.g. "if age > 18"
  • Input/Output
    This shape is used to show data entering or leaving the algorithm
  • Subprogram
    This shape indicates a call to a subprogram (which you can write in another flowchart)