You are on page 1of 12

Have a

laugh!
Week: 5
Topic: Information and Problem Solving
Sub-Topic: Introduction to Problem Solving
Date: 19th & 22nd May,2017
Time: 13:00 – 14:20hrs
Class: Form 5 Arts /Bus&Sci/ Tech
Objectives:
Students will be able to:
 list the steps in problem solving.
 effectively define and analyse a problem using
an IPO chart.
How instructions are given to the
Computer?

Instructions are given to the computer in the form of


computer programs. A computer program is a finite
set of precise instructions, written in a programming
language. Before we write a computer program, we
first have to find a way to solve the problem at hand.
After we have figured out how to solve the problem,
we then translate the solution into a language that is
meaning to the computer.
Problem Solving involves identifying, analysing and resolving problems
using logic, reasoning and analytical skills.

Designing of any computer program involves two major phases:


1. The Problem-Solving Phase
2. The Implementation Phase
1. Define the Problem
2. Analyse the Problem
3. Evaluate alternative Solutions
4. Develop and Represent the most efficient
solution as an algorithm
5. Test and validate the algorithm for
correctness
1. Translate/Implement the algorithm into a
specific programming language.
2. Execute/Run the program on the computer.
3. Document and Maintain the Program.
This is one of the most important steps in
problem-solving, as it leads to a clearer
understanding of what is given and what is
required. If a programmer does not
understands what is required, he/she cannot
produce the desired solution.
 Incorrect  Correct
Write a program that Write a program that
prints a list of all prints a list of all the
students who plan to students who will be
write 11 or more writing 11 or more
subjects. subjects at the
May/June 2016 CSEC
Examination at QC
Defining the problem is a way to help the
programmer understand what he/she is
required to do. It involves decomposing the
problem into three key components:
 What is given (Input)
 The expected results (Output)
 The tasks that must be performed (processing)
INPUT PROCESSING OUTPUT
Identify what is given and what is required for
the following problem statements:
1. Prepare an algorithm using pseudo code that will accept
the length and width of a rectangle and calculate and
display its area.
2. Prepare an algorithm using pseudo code that will accept
the radius of a circle and calculate and display its area.
3. Prepare an algorithm using pseudo code that will accept
the radius of a sphere and calculate and display its
volume.

You might also like