Tuesday, 16 October 2012

Algorithms

Algorithms is a step by step instructions you tell the computer to write a computer program. the computer will follow each instruction that describes how to reach a goal.

Selection where in a algorithm is where youhave to make a choice betweeen two items.

Sequence the order in which the steps are carried out.

Repetition having to repeat a step until a condition is met.

Machine language is code for an aqlgarithom written in a alow level language that only the computer understands ie doesnt have english words in it.

High level compuiter language contains regular words i.e if, then, is.

Flowchart is a algorithm described using a diagram uses standard symbols i.e. a diamond symbol is used for selection.

Pseudocode (pseudo means like something) pseudocode is not real code and tool used by programmers to describe a algorithm it contains standard words like begin, end, print but is not code and is not understood by a computer.

Algorithm for driving through lights.

Is the light green?

If yes continue.

If no.

Is the light red?

If yes then stop.

If no slowdown.
EXAMPLES OF FLOWCHARTS


 my flow chart for driving through lights