WHAT IS AN ALGORITHM?It is a set of instructions of how to carryout a process. An algorithm lists the stepsthat must be followed to complete theprocess and to reach the solution
Examples of algorithms:A knitting patternA set of instructions telling you how to puta kit together (eg. an IKEA kitchen unit)A recipe in a cook bookAn algorithm can be representeddiagrammatically in the form of a flowchart.
A flow chart A flowchart consists of a sequence ofinstructions linked together by arrows toshow the order in which the instructionsmust be carried out. It provides detailed steps. Each instruction is put into a box. The boxes aredifferent shapes depending upon what theinstruction is.
Process shapes…START / ENDHuman processi.e. you doingsomething!Input or outputQuery / questionPrinted output Save to fileYesNoRemember not to create the flowchart in WORD…Instead do this in POWERPOINT and changeFile – Page Layout to PORTRAITAutoshapes has the shapes youneed to use
More shapes You can also use the following shapes: Predefined process Used for a sequence of instructions which is defined somewhereelse (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)Predefinedprocess
TASK 1MAKING A CUP OF TEA! The following listrepresents the stepsneeded in order to makea cup of tea. Put the list inthe right order andproduce an algorithm inPOWERPOINT showingthe processes anddecisions you need tomake.1. Take tea bag out of cup2. Boil the water3. Put tea bag in cup4. Add milk?5. Pour boiling water incup6. Fill kettle7. Stir8. Ready9. Add sugar ?10. Fetch cupAnswers follow
The answers…1. Fill kettle2. Boil the water3. Fetch cup4. Put tea bag in cup5. Pour boiling water in cup6. Take tea bag out of cup7. Add sugar ?8. Stir9. Add milk?10. Stir11. ReadySTARTFill kettleBoil the waterFetch cupPut tea bag in cupPour boiling water in cupTake tea bag out of cupAdd sugar ?Stir in sugarAdd milk?Pour in milk ReadyNNNow add the shapes…
Skills in Powerpoint to create youralgorithm….To tidy up the whole column…select all (drag around all shapes)Go to DRAWSelect ALIGN or DISTRIBUTETo changethis to ….
STARTFill kettleBoil the waterFetch cupPut tea bag in cupPour boiling water in cupTake tea bag out of cupAdd sugar ?Stir in sugarAdd milk?Pour in milkReadyNNTo this…but take care as it canmess up the side sections…!
TASK 2A PREDEFINED PROCESSIn order to carry out no. 8 in the list above,you will need to instruct the user how to filla kettle.(a) Produce a set of instructions called‘Filling a kettle’ and then(b) update your algorithm for task 1 toinclude this predefined process.
TASK 3MAKING A CUP OF COFFEE!How would your algorithm change formaking a cup of coffee instead of tea?Amend your algorithm in Task 2 (b) inorder to produce a new diagram.
Now try to create one on a PCThis should always be done inPOWERPOINT…..NEVER, EVER, EVER in WORD!