Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
59
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. AlgorithmsY10 Introduction
  • 2. 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
  • 3. Examples of algorithms:A knitting patternA set of instructions telling you how to puta kit together (eg. an IKEA kitchen unit)A recipe in a cook bookAn algorithm can be representeddiagrammatically in the form of a flowchart.
  • 4. 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.
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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…
  • 9. 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 ….
  • 10. 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…!
  • 11. TASK 2A PREDEFINED PROCESSIn 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.
  • 12. 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.
  • 13. Now try to create one on a PCThis should always be done inPOWERPOINT…..NEVER, EVER, EVER in WORD!