SlideShare uma empresa Scribd logo
1 de 10
ALGORITHMS & PROGRAMMING
FOR KS3
LEARNING OBJECTIVES
ALGORITHMS
• What is an algorithm?
• Designing an algorithm
• Why use flowcharts or
pseudocode?
PROGRAMMING BASICS
• Program Structure
• Sequencing
• Selection
• Iteration
• Variables
STARTER
SIMON SAYS
WHAT IS AN ALGORITHM?
• An algorithm is a set of step-by-step
instructions to complete a task or solve a
problem.
• Algorithms are NOT computer programs! They help us plan and design the
computer program code that will do the task.
• Flow charts or pseudocode are useful for
developing and visualising algorithms.
REAL-WORLD ALGORITHMS
TASK ALGORITHM EXAMPLE
Building flat-pack
furniture
Affix part A to part B using the
supplied Allan key.
Making a dress Cut along the grain of the fabric.
Use of Television Press ‘Guide’ to access program
listings.
Assembly
Instructions
Sewing
Pattern
TV
Operating
Manual
SIMPLE ALGORITHM
GETTING WASHED & DRESSED STEP 1 – GET UP
1. Get out of bed.
2. Eat breakfast.
STEP 2 – WASH
1. Go to bathroom.
2. Wash face.
STEP 3 - GET DRESSED
1. Remove pyjamas.
2. Put clothes on.
1. What are the INPUTS required to
achieve the OUTPUTS required?
2. What STEPS are needed and in
which SEQUENCE?
3. Are any DECISIONS needed?
4. Is there any REPETITION in the
process?
DO: Write an algorithm for brushing your teeth!
DESIGNING
ALGORITHMS
• Computers need exact instructions
on how and when to perform a task.
• We create a program that performs
exact instructions in the algorithm.
• An algorithm written using a
flowchart or pseudocode can help
us to write effective computer
programming code.
• They help to structure and
SEQUENCE (order) the instructions.
FLOWCHART & PSEUDOCODE EXAMPLE
WHAT IS PROGRAMMING?
A Program is CODE written in a
LANGUAGE that computers
understand.
• SEQUENCE is important so that a computer does
the task in the right order.
• SELECTION is the decision to make or question to
answer. E.g. IF, THEN, ELSE. The path through a
program changes depending on the answers.
• ITERATION is looping through (repeating) a path
until we reach our goal using FOR and WHILE
statements. Iterative programming reduces the
steps required by a program.
Code contains
STATEMENTS
(single instructions)
that tell the computer what to do.
EXAMPLE
Declaring variables to store our
information for use later on.
DO: Identify the variables for the ‘brushing your teeth.’
Using iteration to loop through the steps
whilst the ‘awake’ condition remains true.
Using conditional selection to determine
the path the program will take.
REFLECTION (PLENARY)
WHAT DID YOU LEARN?
What are your key takeaways from the lesson today?
CONFIDENCE LEVEL?
1. Understood ALL of it, very confident.
2. Understood MOST of it, fairly confident.
3. Understood SOME of it and need some support. FURTHER LEARNING…
NEXT LESSON: Datatypes, Variables, Constants and Operators.

Mais conteúdo relacionado

Mais procurados

Introduction to cyclical learning rates for training neural nets
Introduction to cyclical learning rates for training neural netsIntroduction to cyclical learning rates for training neural nets
Introduction to cyclical learning rates for training neural netsSayak Paul
 
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...Sujit Pal
 
Semantical Cognitive Scheduling
Semantical Cognitive SchedulingSemantical Cognitive Scheduling
Semantical Cognitive Schedulingigalshilman
 
Lecture 5 machine learning updated
Lecture 5   machine learning updatedLecture 5   machine learning updated
Lecture 5 machine learning updatedVajira Thambawita
 
Machine learning with scikitlearn
Machine learning with scikitlearnMachine learning with scikitlearn
Machine learning with scikitlearnPratap Dangeti
 
Branch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsBranch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsChamin Nalinda Loku Gam Hewage
 
Kaggle Higgs Boson Machine Learning Challenge
Kaggle Higgs Boson Machine Learning ChallengeKaggle Higgs Boson Machine Learning Challenge
Kaggle Higgs Boson Machine Learning ChallengeBernard Ong
 
Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1ananth
 
Nimrita deep learning
Nimrita deep learningNimrita deep learning
Nimrita deep learningNimrita Koul
 
Meetup_Consumer_Credit_Default_Vers_2_All
Meetup_Consumer_Credit_Default_Vers_2_AllMeetup_Consumer_Credit_Default_Vers_2_All
Meetup_Consumer_Credit_Default_Vers_2_AllBernard Ong
 
Logistic Regression
Logistic RegressionLogistic Regression
Logistic RegressionDong Guo
 
Feature selection
Feature selectionFeature selection
Feature selectionDong Guo
 
Deep learning summary
Deep learning summaryDeep learning summary
Deep learning summaryankit_ppt
 
Deep learning concepts
Deep learning conceptsDeep learning concepts
Deep learning conceptsJoe li
 
Algorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem SolvingAlgorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem Solvingcoolpie
 
Design & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesFellowBuddy.com
 
Analytics Boot Camp - Slides
Analytics Boot Camp - SlidesAnalytics Boot Camp - Slides
Analytics Boot Camp - SlidesAditya Joshi
 
Deep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningDeep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningShubhmay Potdar
 

Mais procurados (20)

Introduction to cyclical learning rates for training neural nets
Introduction to cyclical learning rates for training neural netsIntroduction to cyclical learning rates for training neural nets
Introduction to cyclical learning rates for training neural nets
 
Learning
LearningLearning
Learning
 
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
 
Semantical Cognitive Scheduling
Semantical Cognitive SchedulingSemantical Cognitive Scheduling
Semantical Cognitive Scheduling
 
Lecture 5 machine learning updated
Lecture 5   machine learning updatedLecture 5   machine learning updated
Lecture 5 machine learning updated
 
Machine learning with scikitlearn
Machine learning with scikitlearnMachine learning with scikitlearn
Machine learning with scikitlearn
 
Branch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsBranch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection Algorithms
 
Kaggle Higgs Boson Machine Learning Challenge
Kaggle Higgs Boson Machine Learning ChallengeKaggle Higgs Boson Machine Learning Challenge
Kaggle Higgs Boson Machine Learning Challenge
 
Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1
 
Nimrita deep learning
Nimrita deep learningNimrita deep learning
Nimrita deep learning
 
Meetup_Consumer_Credit_Default_Vers_2_All
Meetup_Consumer_Credit_Default_Vers_2_AllMeetup_Consumer_Credit_Default_Vers_2_All
Meetup_Consumer_Credit_Default_Vers_2_All
 
Logistic Regression
Logistic RegressionLogistic Regression
Logistic Regression
 
Feature selection
Feature selectionFeature selection
Feature selection
 
Deep learning summary
Deep learning summaryDeep learning summary
Deep learning summary
 
Deep learning concepts
Deep learning conceptsDeep learning concepts
Deep learning concepts
 
Algorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem SolvingAlgorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem Solving
 
Design & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture Notes
 
Analytics Boot Camp - Slides
Analytics Boot Camp - SlidesAnalytics Boot Camp - Slides
Analytics Boot Camp - Slides
 
Deep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningDeep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter Tuning
 
Deep MIML Network
Deep MIML NetworkDeep MIML Network
Deep MIML Network
 

Semelhante a Algorithms and Programming

02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptxarifaqazi2
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow chartsChinnu Edwin
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem slovingMani Kandan
 
Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithmsPraveen M Jigajinni
 
Algorithm defination, design & Implementation
Algorithm defination, design & ImplementationAlgorithm defination, design & Implementation
Algorithm defination, design & ImplementationBilal Maqbool ツ
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxssusere336f4
 
Algrithms and frowcharts.pptx
Algrithms and frowcharts.pptxAlgrithms and frowcharts.pptx
Algrithms and frowcharts.pptxGurneetsingh83
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing TechniquesAppili Vamsi Krishna
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartdipti reya
 
Computer and programming language
Computer and programming languageComputer and programming language
Computer and programming languageXad Kuain
 
Computational thinking
Computational thinkingComputational thinking
Computational thinkingr123457
 
Algorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptxAlgorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptxKaavyaGaur1
 
Basic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartBasic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartPrasanna R Kovath
 

Semelhante a Algorithms and Programming (20)

DAA Unit 1.pdf
DAA Unit 1.pdfDAA Unit 1.pdf
DAA Unit 1.pdf
 
Logical Structures
Logical StructuresLogical Structures
Logical Structures
 
02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
 
Debbuging
DebbugingDebbuging
Debbuging
 
Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithms
 
Algorithm defination, design & Implementation
Algorithm defination, design & ImplementationAlgorithm defination, design & Implementation
Algorithm defination, design & Implementation
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptx
 
Algrithms and frowcharts.pptx
Algrithms and frowcharts.pptxAlgrithms and frowcharts.pptx
Algrithms and frowcharts.pptx
 
Beekman5 std ppt_13
Beekman5 std ppt_13Beekman5 std ppt_13
Beekman5 std ppt_13
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Computer and programming language
Computer and programming languageComputer and programming language
Computer and programming language
 
Computational thinking
Computational thinkingComputational thinking
Computational thinking
 
Cse
CseCse
Cse
 
Algorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptxAlgorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptx
 
Basic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartBasic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chart
 

Último

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Último (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Algorithms and Programming

  • 2. LEARNING OBJECTIVES ALGORITHMS • What is an algorithm? • Designing an algorithm • Why use flowcharts or pseudocode? PROGRAMMING BASICS • Program Structure • Sequencing • Selection • Iteration • Variables
  • 4. WHAT IS AN ALGORITHM? • An algorithm is a set of step-by-step instructions to complete a task or solve a problem. • Algorithms are NOT computer programs! They help us plan and design the computer program code that will do the task. • Flow charts or pseudocode are useful for developing and visualising algorithms.
  • 5. REAL-WORLD ALGORITHMS TASK ALGORITHM EXAMPLE Building flat-pack furniture Affix part A to part B using the supplied Allan key. Making a dress Cut along the grain of the fabric. Use of Television Press ‘Guide’ to access program listings. Assembly Instructions Sewing Pattern TV Operating Manual
  • 6. SIMPLE ALGORITHM GETTING WASHED & DRESSED STEP 1 – GET UP 1. Get out of bed. 2. Eat breakfast. STEP 2 – WASH 1. Go to bathroom. 2. Wash face. STEP 3 - GET DRESSED 1. Remove pyjamas. 2. Put clothes on. 1. What are the INPUTS required to achieve the OUTPUTS required? 2. What STEPS are needed and in which SEQUENCE? 3. Are any DECISIONS needed? 4. Is there any REPETITION in the process? DO: Write an algorithm for brushing your teeth!
  • 7. DESIGNING ALGORITHMS • Computers need exact instructions on how and when to perform a task. • We create a program that performs exact instructions in the algorithm. • An algorithm written using a flowchart or pseudocode can help us to write effective computer programming code. • They help to structure and SEQUENCE (order) the instructions. FLOWCHART & PSEUDOCODE EXAMPLE
  • 8. WHAT IS PROGRAMMING? A Program is CODE written in a LANGUAGE that computers understand. • SEQUENCE is important so that a computer does the task in the right order. • SELECTION is the decision to make or question to answer. E.g. IF, THEN, ELSE. The path through a program changes depending on the answers. • ITERATION is looping through (repeating) a path until we reach our goal using FOR and WHILE statements. Iterative programming reduces the steps required by a program. Code contains STATEMENTS (single instructions) that tell the computer what to do.
  • 9. EXAMPLE Declaring variables to store our information for use later on. DO: Identify the variables for the ‘brushing your teeth.’ Using iteration to loop through the steps whilst the ‘awake’ condition remains true. Using conditional selection to determine the path the program will take.
  • 10. REFLECTION (PLENARY) WHAT DID YOU LEARN? What are your key takeaways from the lesson today? CONFIDENCE LEVEL? 1. Understood ALL of it, very confident. 2. Understood MOST of it, fairly confident. 3. Understood SOME of it and need some support. FURTHER LEARNING… NEXT LESSON: Datatypes, Variables, Constants and Operators.

Notas do Editor

  1. Step-by-step: Like giving directions to a friend. How do we write an algorithm? For a comic, we might draw pictures in a story board. We use flow charts and pseudocode to visualise our algorithm easily. Pseudo means ‘not the real thing’ so pseudocode is the instructions in our own words. Let’s be clear: Algorithms are NOT computer programs!
  2. When we design an algorithm, it forces us to think about the overall goal; the individual steps needed to accomplish that task. We consider the inputs required to achieve the output needed. The algorithm design process can also help us to think about different ways of solving problems. END OF SLIDE: Now write your own simple algorithm for brushing their teeth.
  3. Computers need exact Instructions! Take away the “Is water boiled” question – our while loop (ITERATION) – we could end up with a cold cup of tea! Take away the “put teabag in cup” statement and you have just hot water. Equally, the order (SEQUENCE) is important… is it milk first or last? One to discuss outside of the lesson!
  4. THIS IS WHERE PROGRAMMING COMES IN! SELECTION is important to manage the various paths through a program depending on decision points. Without selection, there would only be 1 path and the program would be ineffective and unrealistic. ITERATION is efficient and requires less processing as it managed the repetitive tasks. It keeps the algorithm simple.
  5. We learned about algorithms, what can helps us to design them, Program structure and basic programming concepts. At the beginning of the next lesson (before moving on), I would ask the students what they can recall from the last lesson. Perhaps ask different students to come out “Be the teacher” and give 1 minute mini teach on the different areas.