Wednesday 17 October 2012

Flowchart


Questions on Flowcharts

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

When you read the temp you will see whether  it is less than 32 degrees if yes, then it is below freezing point, if no it then is above freezing point. After the decision is made the steps are complete.

 
 
 
 
 
 
 If the switch is on the light turns on and the timer will start, but if not then the task can not commence. Once one second has expiered the light should turn off, but if one second has not passed then the light will not turn on. Once the light has turned of the timer will reset and the task will be complete.




Then you can use word to answer the following question.

  1. 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.


 



“Computers never do what you want them to do,



“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
Its is a step by step instruction Manuel that you tell the computer to write a computer program. The computer will follow each step Manuel to achieve the goal. Can be used in computer programming.

2.       Pseudocode
Pseudo means ‘like’ something, not the real thing but similar to it. Tools used by programs to describe an algorithm. It contains standard words but it is not code or understand by a computer.  for example. Begin, end etc.

3.       Machine Language
Is code for an algorithm written in a low level language that only the computer understands. Eg: doesn’t have English words in it.

4.       High Level Computer Language
A high level computer language contain regular words like : if, then etc.

5.       Flowchart
Is another way of writing an algorithm though using a diagram. It uses a standard symbol. EG: a diamond

6.       Sequence
The order in which steps are carried out.

7.       Selection
Selection in an algorithm is when you have to make a choice and is between two items. Most selections are set up to ask a yes no question.

8.       Repetition
Having to repeat a step again and again until a goal is achived or a condition is met. Eg, walking, lift your right leg, move it forward
 
Then with the aid of class discussions, write an algorithm for the following processes;

1.       opening a door and entering a room.

2.       Negotiating traffic lights as you drive down a street.

·         Is the light green?

·         If yes, continue driving.

·          If not, is the light red?

·         If yes, stop.

·         If not then slow down.

In your algorithm write each step of the process on a new line. Remember not to assume the computer knows anything.