Algorithms: Y10 Introduction
Algorithms: Y10 Introduction
Y10 Introduction
WHAT IS AN ALGORITHM?
It is a set of instructions of how to carry out a process. An algorithm lists the steps that must be followed to complete the process and to reach the solution
Examples of algorithms:
A knitting pattern A set of instructions telling you how to put a kit together (eg. an IKEA kitchen unit) A recipe in a cook book An algorithm can be represented diagrammatically in the form of a flow chart.
A flow chart
A flowchart consists of a sequence of instructions linked together by arrows to show the order in which the instructions must be carried out. It provides detailed steps. Each instruction is put into a box. The boxes are different shapes depending upon what the instruction is.
Process shapes
Remember not to create the flow Input or output chart in WORD START / END Instead do this in POWER POINT and change Human process
i.e. you doing something! Query / question
No
Printed output
More shapes
You can also use the following shapes: Predefined process
Predefined process
Used for a sequence of instructions which is defined somewhere else (eg. in a subroutine) Connector to link with a different page or another part of the program (Note: all these shapes can be found under AutoShapes if you click the Drawing icon on your tool bar)
1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
Take tea bag out of cup Boil the water Put tea bag in cup Add milk? Pour boiling water in cup Fill kettle Stir Ready Add sugar ? Fetch cup
The answers
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Fill kettle Boil the water Fetch cup Put tea bag in cup Pour boiling water in cup Take tea bag out of cup Add sugar ? Stir Add milk? Stir Ready
Now add the shapes
Stir in sugar
Add milk? Pour in milk
N Ready
Pour boiling water in cup Take tea bag out of cup Add sugar ? N
Stir in sugar
Add milk? Ready Pour in milk