Solving a problem

Algorithm

  • The algorithm is a written document that tells a programmer EXACTLY what needs to happen in a program, step-by-step. If a problem is solved with an algorithm it can be easily put into any programming language by a programmer that knows that language.

Pseudocode

definition: it is a detailed yet easy to read description of what a computer program will do, written in a natural language rather than in a programming language.

  • While no specific standard for pseudocode syntax exists, certain terms are considered standard like:
    // Comments are done by putting two forward slashes before the lines you want to
    // document. Comments are used to explain code.

  • Terms like display, input, prompt, and declare are considered proper in pseudocode.

  • In Python 3 the programmer would write:

    print ("Welcome to my program")

Flowchart

  • A flowchart is another tool a programmer uses when designing a program

  • Flowcharts are graphical representations of the steps required to solve a problem (the algorithm).
    Flowcharts can be drawn by hand or created using software.