Tuesday, October 11, 2011

algorithms flowchart;

flowchart #3;

When flowchart #3 starts, it will ask the question: is switch on? If the answer is no, the question will be asked again until the answer is yes. When the answer is yes, the LED will be turned on then the timer starts. If it hasn't been a second since the timer started, the question will be asked until a second passes and the answer is yes. When the answer is yes, the Led will be turned off and the timer will be reset.

flowchart #2;

When flowchart #2 starts, it reads the temperature. It asks the question: is the temperature less than 32? If yes, "Below Freezing" will be printed. If no, "Above Freezing" will be printed.

algorithms;

1. Opening a door and entering a room
twist knob > is the door locked?
> yes - put in a key
> no > open door > enter room

2. Negotiating traffic lights as you drive down a street
is there a car passing left and right?
> yes - wait until cars pass
> no > continue driving

flowchart #1;

When flowchart #1 starts, it will continue to step 1 in which a decision need to be made: choice 1 or choice 2? if choice 2 is chosen, step 1 needs to be repeated and will ask the question again. If choice 1 is chosen, it will continue from steps 2 to 6 until it reaches the end.

repetition;

A loop (also called repetition) is one of three basic logic structures in computer programming. In a repetition structure, the program asks a 'question' and if the 'answer' requires an action, the question is repeated aagain until an action is no longer required to answer the question. Logic problems can be solved forming algorithms using a loop structure.

selection;

A selection (also called decision) is one of three basic logic structures in computer programming. In a selection structure, a 'question' is asked and the program answers by taking one of two 'courses of action' (choices). It is then the program moves to the next 'question' (event). Logic probems in programming can be solved by forming algorithms using a selection structure.

sequence;

A sequence is one of three basic logical structure in computer programming. In a sequence structure, an action takes place in a sequence - a predetermined order. Logic problems in programming can be solved by forming algorithms using a sequence structure.

flowchart;

A flowchart is a graphical representation of decisions and its results mapped out in shapes. It allows for a step by step diagram to be drawn out. It is used in situations like for steps in programming code or troubleshooting a computer. An example of a computer flowchart is:

high-level language;

A high-level language is a programming language with strong representation of the details of the computer. It enables a programmer to write programs that are indendent of a type of computer. They are called high-level because they are more similar to human languages and different from machine languages. Examples of high-level language include: C, FORTRAN, Pascal.

machine language;

The set of instructions in binary form that is used to represent operations and data - which is interpreted by a computer's central processing unit.

Monday, October 10, 2011

psuedocode;

A pseudocode is a description of the purpose of a computer program or algorithm (its functions), expressed in natural language rather than in a formal language. This is why it is intended for human reading rather than machine reading. Sometimes it is used

algorithms;

A simple way to define algorithm is: it is a step-by-step set of instructions used to solve a problem, implemented or simulated by a program. It is a method used to calculate a function. It is for calculation, data processing and automated reasoning.