SS 2 WEEK FIVE LESSON NOTE (ICT_323)

 


Ss2

TOPIC: ALGORITHMS AND FLOWCHART

Introduction

An algorithm is a set of instructions, sometimes called a procedure or a function that is used to perform a certain task.

A flow chart is a type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. This diagrammatic representation can give a step-by-step solution to a given problem.

Characteristics of an algorithm

i.  Fitness: an algorithm terminates after a finite number of steps.

ii. Definiteness: each step in an algorithm is unambiguous. This means that the action specified by the step cannot be interpreted in multiple ways & can be performed without any confusion.

iii. Input: an algorithm accepts zero or more inputs.

iv.  Output: it produces at least one output.

v. Effectiveness: it consists of basic instructions that are realizable. This means that the instruction can be performed by using the given inputs in a finite amount of time.

ADVANTAGES OF FLOWCHART

1.     It represents data flow

2.     It provides a clear overview of the entire program and problem and solution.

3.     It provides the facility for coding

4.     It provides the way of modification of running program.

5.     They show all major elements and their relationship.

DISADVANTAGES OF FLOWCHARTS

1.     It is the total perception of the designer who has drawn the flowchart

2.     It’s working differ from one compiler to another, one language to another sometime.

3.     It needs well-defined requirements

4.     It is basically for structured programming.

 BASIC FLOWCHART SYMBOLS

NAME

SYMBOL

USE IN FLOWCHART

Oval

Denotes the beginning or end of a program

Flow line

Denotes the direction of logic flow in a program

Parallelogram

Denotes either an input operation (e.g. INPUT or an output operation(e.g. OUTPUT)

Rectangle

Denotes a process to be carried out (e.g. an addition)

Diamond

 

Denotes a decision (or branch) to be made. The program should continue along one of two routes (e.g. IF/THEN/ELSE)

Comments

Popular posts from this blog

JSS 2 WEEK TWO LESSON NOTE_FIRST TERM 2023

SSS TWO WEEK TWO LESSON NOTE (ICT_223)

JSS ONE WEEK THREE LESSON NOTE (ICT_223)