0% found this document useful (0 votes)
11 views13 pages

Module 2

This document provides an overview of general problem solving using a 5-step approach and includes examples of applying the approach. The 5 steps are: 1) Analyze the problem, 2) Identify alternative solutions, 3) Select the best solution, 4) List the steps (algorithm), and 5) Evaluate the steps. Examples demonstrate solving everyday problems like covering books, withdrawing money from an ATM, writing a letter, washing clothes, and going to school. Homework exercises are assigned to write step-by-step instructions for buying a book, making tea, cooking an egg, and washing a car.

Uploaded by

Jahudi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views13 pages

Module 2

This document provides an overview of general problem solving using a 5-step approach and includes examples of applying the approach. The 5 steps are: 1) Analyze the problem, 2) Identify alternative solutions, 3) Select the best solution, 4) List the steps (algorithm), and 5) Evaluate the steps. Examples demonstrate solving everyday problems like covering books, withdrawing money from an ATM, writing a letter, washing clothes, and going to school. Homework exercises are assigned to write step-by-step instructions for buying a book, making tea, cooking an egg, and washing a car.

Uploaded by

Jahudi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 13

Module #2: Lecture 2

DEVS 1/0

General problem
1
solving
Introduction
 Looking at how to
Analyze a problem and
Plan a solution to it using a five-step problem
solving approach.
 This approach can be used for
Everyday/general life situations or
For problems that can be solved by programming.
 Programming can be defined as the development of a
solution to an identified problem.
2
Introduction (… 2)
 Computerprogramming is an art.
 Many people believe that a programmer must
 be good at mathematics,
 have a memory for figures and technical information, and
 spend many hours sitting at a computer typing programs.

 However, given the right tools, and steps to


follow, anyone can write well-designed
programs.
3
Using a computer to solve a problem
 A computer is just a dumb machine that can only obey
instructions (do what it is told to do).
 A programmer has to:
 Work-out the steps for the solution (logical steps),
 Translate those steps into a computer programming language
(create a program)
 Compile and execute the program in the computer to see the results
of the solution.

4
General problem solving approach

1. Analyze the problem


2. Identify alternative ways to solve the problem
3. Select the most effective way to solve the
problem
4. List all the steps to solve the problem
(algorithm)
5. Evaluate the steps for accuracy & correctness

5
Problem solving example#1

“You have to cover your books


with brown/colored paper,
plastic and written labels”
 List the steps to outline how
to solve this.
6
Problem solving example#1 - Solution

1. Take the first book.


2. Cut the brown/colored paper to the correct size.
3. Cover the book
4. Write the correct label for that subject.
5. Paste the label on to the book
6. Cover the book with plastic
7. Repeat this process until all the books are
covered.
7
Problem solving example#2
 The ATM (Automated Teller Machine) is used to withdraw,
deposit, transfer money etc. Consider that you need to use the
machine to withdraw money and you have enough money in
your account. Use your knowledge of using an ATM to
answer the following question.
 Note: The machine is working.

QUESTION: List the various steps needed to perform (in


the correct order) when you want to withdraw money.

8
Problem solving example#2 - Solution

1) Insert card
2) Enter your pin number
3) Select / Enter amount you want
4) Select type of account
5) Take card
6) Take money and receipt

9
Problem solving example#3
 Write a letter.

10
Problem solving example#4
 Wash your clothes.
(You may use a bucket instead of a basin; soap instead of
washing powder, etc. Answers should make sense.)

11
Problem solving example#5
 Going to school.
(Write a detailed set of instructions, in
sequence to complete the above task
(minimum 6 steps for each):

12
Home work exercises
 Write a detailed set of instructions, in sequence
to complete the following task (minimum 6
steps for each):
1. Buy a book at a shop
2. Make a cup of tea for your self.
3. Cook an egg for your self.
4. Washing a car

13

You might also like