Skip to content
HeadTeacher.ng
Lesson Notes

Lesson Note on Algorithm and Flow Chart: Writing Algorithms for Problem Solving for SSS 2

This lesson note on Algorithm and Flow Chart for SSS 2 focuses on writing simple algorithms for tasks like averages, equation evaluation and printing odd numbers.

Published Reading7 min Comments0

Class: Senior Secondary School 2 (SSS 2 / SS2)
Term: Third Term
Week: 2
Age: 16 years
Duration: 45 minutes
Subject: Computer Studies
Curriculum Theme: Problem Solving and Programming Concepts
Previous Lesson: Algorithms and Flow Chart: Meaning, Characteristics and Functions.
Topic: ALGORITHM AND FLOW CHART
Subject Matter: Writing algorithm for solving a given problem (compute average of numbers, evaluate equation, print first ten odd numbers)

Specific Objectives

By the end of the lesson, pupils should be able to:

Cognitive Domain:

  • Define an algorithm.
  • State the characteristics of a good algorithm.
  • Outline the steps involved in writing an algorithm.
  • Write simple algorithms for given problems.

Affective Domain:

  • Appreciate the importance of algorithms in problem-solving.
  • Develop a logical approach to solving problems.

Psychomotor Domain:

  • Construct algorithms for computing the average of numbers.
  • Construct algorithms for evaluating mathematical equations.
  • Construct algorithms for printing a sequence of numbers.

Social Domain:

  • Collaborate with peers to develop algorithmic solutions.
  • Communicate algorithmic steps clearly to others.

Reference Materials

The following resources were used in planning this lesson:

  • Senior Secondary Schools Education Curriculum
  • State Unified Scheme of Work
  • Computer Studies for Senior Secondary Schools 2 Textbook
  • https://www.geeksforgeeks.org/introduction-to-algorithms/
  • https://www.javatpoint.com/algorithm-and-flowchart-in-c

Instructional Materials

The teacher will teach this lesson with the aid of:

  • Worked examples sheet
  • Whiteboard and markers
  • Calculator
  • Worksheets with problem statements

Rationale for the Lesson

Understanding algorithms helps pupils to break down complex problems into smaller, manageable steps. This skill is fundamental for logical thinking, problem-solving, and serves as a foundation for future computer programming, which is essential in today’s digital world.

Prerequisite/Previous Knowledge

Pupils should have basic knowledge of arithmetic operations and simple problem-solving concepts.

Lesson Content/Board Summary

ALGORITHM AND FLOW CHART

Definition of Algorithm

An algorithm is a finite set of step-by-step, well-defined instructions for solving a particular problem. It is a sequence of unambiguous instructions used to solve a computational problem or to perform a task.

Characteristics of a Good Algorithm

  • Input: An algorithm must have zero or more well-defined inputs.
  • Output: An algorithm must have one or more well-defined outputs, and should match the desired output.
  • Finiteness: An algorithm must terminate after a finite number of steps.
  • Definiteness: Each step of an algorithm must be clear and unambiguous.
  • Effectiveness: Each step must be simple enough to be executed in a finite amount of time.

Steps for Writing an Algorithm

To write an algorithm, follow these general steps:

  • Step 1: Problem Definition: Clearly understand the problem to be solved.
  • Step 2: Input Identification: Determine what inputs are required.
  • Step 3: Output Identification: Determine what output is expected.
  • Step 4: Process Breakdown: Break the problem into smaller, logical steps.
  • Step 5: Sequence of Steps: Arrange the steps in a logical order.
  • Step 6: Refinement: Review and refine the steps for clarity and efficiency.

Examples of Algorithms

Algorithm to Compute the Average of Three Numbers

This algorithm calculates the average of three given numbers.

  1. Step 1: START
  2. Step 2: DECLARE three variables, say Num1, Num2, Num3, and a variable for Average.
  3. Step 3: INPUT the values for Num1, Num2, and Num3.
  4. Step 4: CALCULATE Average = (Num1 + Num2 + Num3) / 3.
  5. Step 5: PRINT the calculated Average.
  6. Step 6: STOP

Worked Example: Compute the average of 10, 20, 30.

Step 1: START

Step 2: Declare Num1, Num2, Num3, Average.

Step 3: Input Num1 = 10, Num2 = 20, Num3 = 30.

Step 4: Calculate Average = (10 + 20 + 30) / 3 = 60 / 3 = 20.

Step 5: Print 20.

Step 6: STOP

Algorithm to Evaluate the Equation: Y = a(b-c)²/d + 2

This algorithm calculates the value of Y based on given values for a, b, c, and d.

  1. Step 1: START
  2. Step 2: DECLARE variables a, b, c, d, Y.
  3. Step 3: INPUT values for a, b, c, and d.
  4. Step 4: CALCULATE Temp1 = b – c.
  5. Step 5: CALCULATE Temp2 = Temp1 * Temp1 (which is (b-c)²).
  6. Step 6: CALCULATE Temp3 = a * Temp2.
  7. Step 7: CALCULATE Temp4 = Temp3 / d.
  8. Step 8: CALCULATE Y = Temp4 + 2.
  9. Step 9: PRINT the value of Y.
  10. Step 10: STOP

Worked Example: Evaluate Y = a(b-c)²/d + 2 where a=5, b=10, c=4, d=2.

Step 1: START

Step 2: Declare a, b, c, d, Y.

Step 3: Input a=5, b=10, c=4, d=2.

Step 4: Calculate Temp1 = 10 – 4 = 6.

Step 5: Calculate Temp2 = 6 * 6 = 36.

Step 6: Calculate Temp3 = 5 * 36 = 180.

Step 7: Calculate Temp4 = 180 / 2 = 90.

Step 8: Calculate Y = 90 + 2 = 92.

Step 9: Print 92.

Step 10: STOP

Algorithm to Print the First Ten Odd Numbers

This algorithm identifies and prints the first ten positive odd numbers.

  1. Step 1: START
  2. Step 2: DECLARE a variable Count = 0 (to count odd numbers found).
  3. Step 3: DECLARE a variable Number = 1 (starting from the first odd number).
  4. Step 4: REPEAT the following steps WHILE Count < 10:
    1. Step 4a: PRINT Number.
    2. Step 4b: INCREMENT Count by 1.
    3. Step 4c: INCREMENT Number by 2 (to get the next odd number).
  5. Step 5: STOP

Teaching Methods/Instructional Techniques

Discussion, Lecture, Demonstration, Question and Answer, Visual Aids

Instructional Procedures

Step 1: Introduction

Time: 5 minutes
Teaching Skill: Set Induction
Teacher’s Activity: The teacher greets the pupils and reviews the previous lesson. The teacher then introduces the topic “Algorithm and Flowchart” by asking pupils how they would explain simple everyday tasks, like preparing tea, in a step-by-step manner.
Pupils’ Activity: Pupils respond to the greeting and participate in the brief review. They offer ideas on how to explain daily tasks step-by-step.
Learning Point: Pupils are prepared for the lesson and connect new knowledge to familiar concepts.

Step 2: Definition of Algorithm

Time: 7 minutes
Teaching Skill: Explanation/Definition
Teacher’s Activity: The teacher defines an algorithm, explaining it as a set of precise, step-by-step instructions for solving a problem. The teacher also discusses the key characteristics of a good algorithm, such as finiteness and definiteness.
Pupils’ Activity: Pupils listen attentively, ask questions for clarification, and take notes on the definition and characteristics of an algorithm.
Learning Point: Pupils understand what an algorithm is and its essential features.

Step 3: Steps for Writing an Algorithm

Time: 7 minutes
Teaching Skill: Elucidation/Instruction
Teacher’s Activity: The teacher explains the general steps involved in writing an algorithm, from problem definition to refinement, emphasizing the importance of a logical sequence.
Pupils’ Activity: Pupils listen and note down the steps, contributing to the discussion on why each step is important.
Learning Point: Pupils learn a structured approach to developing algorithms.

Step 4: Algorithm for Average of Numbers

Time: 7 minutes
Teaching Skill: Demonstration/Guided Practice
Teacher’s Activity: The teacher demonstrates how to write an algorithm to compute the average of three numbers, using a worked example on the whiteboard. The teacher guides pupils through each step.
Pupils’ Activity: Pupils observe the demonstration, ask questions, and attempt to write the algorithm themselves on their worksheets.
Learning Point: Pupils learn to apply algorithmic steps to a numerical problem.

Step 5: Algorithm for Equation Evaluation

Time: 7 minutes
Teaching Skill: Demonstration/Problem Solving
Teacher’s Activity: The teacher presents the equation Y = a(b-c)²/d + 2 and guides pupils through writing an algorithm to evaluate it, breaking down the mathematical operations into sequential steps.
Pupils’ Activity: Pupils follow the teacher’s steps, actively participate in breaking down the equation, and write the algorithm for evaluating the equation.
Learning Point: Pupils apply algorithmic thinking to complex mathematical expressions.

Step 6: Algorithm for Printing Odd Numbers

Time: 7 minutes
Teaching Skill: Demonstration/Conceptualization
Teacher’s Activity: The teacher demonstrates how to write an algorithm to print the first ten odd numbers, introducing the concept of repetition (looping) in a simple way.
Pupils’ Activity: Pupils observe the demonstration and write the algorithm, understanding how to generate a sequence of numbers using a repetitive process.
Learning Point: Pupils grasp the concept of iteration in algorithm design.

Step 7: Evaluation/Review

Time: 5 minutes
Teaching Skill: Questioning/Assessment
Teacher’s Activity: The teacher evaluates the learning by asking the following questions:

  1. Define an algorithm in your own words.
  2. Mention two characteristics of a good algorithm.
  3. State any three steps involved in writing an algorithm.
  4. Write an algorithm to compute the sum of two numbers.

Pupils’ Activity: Pupils answer orally and in writing.

Learning Point: Pupils demonstrate understanding of the lesson.

Step 8: Conclusion

Time: 2 minutes
Teaching Skill: Summarization
Teacher’s Activity: The teacher summarizes the key points of the lesson, reiterating the importance of algorithms in daily life and computer programming. The teacher assigns homework for pupils to write an algorithm for a simple everyday task.
Pupils’ Activity: Pupils listen to the summary and note down the homework assignment.
Learning Point: Pupils consolidate their learning and prepare for independent practice.

Lesson Keywords

  • Algorithm – A step-by-step procedure for solving a problem.
  • Flowchart – A diagrammatic representation of an algorithm.
  • Problem-solving – The process of finding solutions to complex issues.
  • Instructions – Detailed directions on how to do something.

Differentiation

For pupils who grasp concepts quickly, the teacher can provide more complex problems to develop algorithms for. For pupils who need more support, the teacher will provide simplified problems and more direct guidance, using visual aids and one-on-one assistance.

Note for teachers using this lesson plan

Teachers should ensure pupils actively participate in writing algorithms and testing them with sample data. Encourage discussion and collaboration among pupils to foster a deeper understanding of algorithmic thinking. Emphasize that there can be multiple correct algorithms for the same problem.

Export this post
Lesson Note on Algorithm and Flow Chart: Writing Algorithms for Problem Solving for SSS 2
About the author

Royal Alikor

Royal Alikor is an educator with six years of classroom teaching and three years of elementary school leadership experience. He develops and reviews practical, curriculum-aligned learning materials for Nigerian schools.

Community Join the conversation Open discussion +