Wednesday, October 20, 2010

Flowcharts

Questions on Flowcharts


1. For each of the flowcharts below describe in words what you think they will do.

This flowchart is to tell you if the temperature is below or above freezing temperature.

This flowchart is there to tell you how long the LED light will stay on.











How to use word to draw flowcharts
You can go to this link for an explanation of the shapes in word that can be used for flowcharts, just don’t bother giving them your email address.

Then you can use word to answer the following question.

2. Convert one of the algorithms you have created in the previous task into a flowchart, e.g. opening a door, moving through a traffic light.


Tuesday, October 12, 2010

Computer Algorithms

“Computers never do what you want them to do,

they only do what you tell them to!”

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 set of clear instructions to complete a task in a finite time.
2. Pseudocode- An informal language that helps programmers develop an Algorithm.
3. Machine Language- A system of instructions executed by the computer's CPU.
4. High Level Computer Language- A type of programming laguage that isn't limited by the type of computer or by one specific job.
5. Flowchart- A type of diagram that represents an algorithm process.
6. Sequence- The order in which something is done.
7. Selection- Choose. If and Then.
8. Repetition- Repeating a sequence of instructions.


Then with the aid of class discussions, write an algorithm for the following processes;
In your algorithm write each step of the process on a new line. Remember not to assume the computer knows anything.
1. Opening a door and entering a room-
  • Stand in front of the door,
  • Lift one hand up towards the doorknob,
  • Squeeze the doorknob lightly,
  • Twist it in a clockwise direction,
  • Pull the door towards you,
  • Let go of the doorknob,
  • Walk through the door,
  • Enter the room.

2. Negotiating traffic lights as you drive down a street-
Red Light= Stop, Green Light= Go, Orange Light= Slow down, prepare to stop.
  • Approach the light,
  • Check the colour of the lights,
  • If the light is green then continue driving,
  • If the light is red then prepare to stop driving,
  • If the light is orange then slow down.