Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

Develop a

narrative
solution to a
given task
Module 5: Programming concepts
and computational thinking (5.8)

1
In understanding the problem and investigating the problem we
were introduced to several strategies including:

pattern algorithm
decomposing abstracting
recognizing developing

We will focus on the foundational aspects of Algorithm Development in this


Presentation.
2
3
ALGORITHM- Definition

An algorithm is a sequence of precise instructions for solving


a problem in a finite amount of time.

CSEC Information Technology –A Guide To Problem-Solving and


Programming Prepared by P. Francis-Cobley 4
ALGORITHMS- Characteristics
Precise- an algorithm must be definite. It must be strictly
defined.

Unambiguous- an algorithm must not be open to more than


one interpretation.

Logical flow- an algorithm have instructions that pass the


flow of control from one process/action to another.

Finite steps- an algorithm contains a finite number of


instructions. This means they terminate at some point.
They do not last forever.

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley

Information Technology for CSEC Examinations 3rd Edition Howard Campbell and Alan Wood

Information Technology for CSEC 2nd Edition Leo Cato Jan Holligan, Denzle Murray, Kati Paizee 5
Activity

Notesmaster Algorithms: Developing a Narrative Solution


To a Given Task -Nadia Pierre
6
ALGORITHMS- Representations

Narrative

Pseudocode

Flowchart

A computer program is an algorithm rewritten in a programming language


which directs the computer to solve a problem.
7
Heinemann Information Technology for CSEC K. Mary Reid et al
Narrative Algorithm 

A Narrative Algorithm is simply writing algorithms in plain English


statements.  These statements are written in steps that are clear, precise
and easy to understand. 

Notesmaster Algorithms: Developing a Narrative Solution To a Given


Task -Nadia Pierre 8
Diagram showing the Narrative Algorithm in relation to other types of
Algorithms.

Algorithms In Narrative Form – Island Class


9
Narrative Algorithm 

An algorithm in narrative form is not written in discrete steps. It is


expressed as directions in paragraph form and instructions on how rules
should be followed.

An algorithm in narrative form can be considered a precursor to


pseudocode or a flowchart

Algorithms In Narrative Form – Island Class


10
Narrative Algorithm Example
An example of a Narrative Algorithm is given below for the given problem
statement

Problem Definition: You are required to read two whole numbers. Determine the
sum of those two numbers. Display the sum of the two whole numbers.

Algorithm in narrative form: 


Request the user to enter the first whole number.
Store that first whole number.
Request the user to enter the second whole number.
Store that second whole number.
Determine the sum of the two numbers by adding them together.
Store the result of the sum of the two numbers.
Display the sum of the two numbers.
11
Activity

Write an algorithm in narrative form which gives instructions/directions


on how to follow the rules in order to play “Snakes and Ladders”. Note
write each step as an informative sentence.

12
THE END

13

You might also like