Monday, October 10, 2011

#Computer Algorithms.

Using the web, find definitions for the following terms and post them on your blog. Make sure the definitions relate to computers and programming.

1. Algorithms
A process or set of rules to be followed in calculations or other problem solving operations, usually by a computer.

2. Pseudocode
Is a compact and information high-level description of a computer programming algorithm that uses the structural conventions of a programming languages, but is intended for human Reading rather than machine reading.

3. Machine Language
A programming language designed for use on a specific class of computers.

4. High Level Computer Language
A high-level programming language is a programming language with strong abstraction from the details of the computer.

5. Flowchart
A diagram of the sequence of operations in a computer program or an accounting system.

6. Sequence
A particular order in which related events, movements or things follow each other.

7. Selection
Data highlighted on a computer screen that is a target for various manipulations.

8. Repetition
The action of repeating something that has already be said or written.

2. Then with the aid of class dicussions, write an algorithm for the flollowing processes;
a. Opening a door and entering a room.

1. Start
2. Find a door.
3. Did you find a door? No go back to 1. Yes go to 4.
4. Grasp the handle and turn.
5. Push the door away from you to allow it to open.
6. Walk into the room.
7. End.

b. Negotiating traffic lights as your drive down a street.

1. Start.
2. Are you near the lights? Yes, go to 3. No, go to 6.
3. Are the lights green? Yes, go to 4. No, go to 7.
4. Keep going.
5. Are the lights red? Yes, go to 8. No, go to 1.
6. Are you far away from the lights? Yes continue 7. No go to 2.
7. Is the light orange? Yes, go to 8. No, go to 3.
8. Slow down and pull to stop at the traffic light.

No comments:

Post a Comment