2.1 understand problem solving concept
TRANSCRIPT
WEEK 4
CLO 1
Explain the basic computer and programming fundamentals with appropriate examples of language and technology
Chapter 2:
Problem Solving Methods
2.1 Understand problem solving concept
Problem Solving Concept
•Problem solving in Everyday Life
- people make decisions everyday to solve problems that affect
their lives
- problem maybe unimportant or maybe important
- if a bad decision is made, time and resources are wasted
Problem Solving Concept• There are six steps to follow to assure the best decision
Identify the problem
Understand the problem
Identify alternatives ways to solve the problem
Evaluate the solution
Select the best way to solve the problem from the list of alternative solutions
List instructions that enable you to solve the problem using the selected solution
1
2
3
4
5
6
Problem Solving Concept• There are six steps to follow to assure the best decision:
a) Identify the problem
- make sure you identify the problem before you
start solving the problem.
b) Understand the problem
- includes understanding the knowledge base
of the person or machine for whom you are
solving the problem
Problem Solving Concept• There are six steps to follow to assure the best decision
c) Identify alternatives ways to solve the problem
- the list should be as complete as possible
d) Select the best way to solve the problem from the list of
alternative solution
- you need to identify and evaluate the pros and cons
of each possible solution before selecting the best
one
Problem Solving Concept• There are six steps to follow to assure the best decision:
e) List instructions that enable you to solve the problem using the selected solution
- this step-by-step instructions must fall within
the knowledge base set up in step 2
f) Evaluate the solution
- check its result to see if it is correct, and to see if it
satisfies the needs of the person with the problem
Problem Solving Concept• Exercise
• In a group of 2 members, by using the six steps
• mentioned earlier, try to solve the problem of what to do on this Saturday evening.
Problem Solving Concept
• Types of problem
- problems do not always have straightforward solutions
- some problems can be solved with a series of actions.
- This solutions are called algorithmic solutions.
- solutions that cannot be reached through a direct set of steps are
called heuristic solutions
Problem Solving Concept
• Problem solving with computer
- computer are built to dealt with algorithmic solutions
- fields of computer that deals with heuristic types of
problems is called artificial intelligent
Problem Solving Concept
• Difficulty with problem solving
- some have not been taught how to solve problems.
- some are afraid to make a decision for fear it will be the
wrong one
- often, when people go through the problem solving
process, they complete one or more of the steps
inadequately
- when solving problems on the computer, one of the
most difficult tasks for the problem solver is writing the
instructions.
Problem Solving Concept
• Types of problems that can be solved on computer are:
a) computational – problems involving some kind of mathematical processing
b) logical – problems involving relational or logical processing
c) repetitive – problems involving repeating a set of mathematical and /or logical instructions
Input, Process and Output
• Information processing cycle is the sequence of events in processing information which includes:
a) input – entering data into the computer
b) processing – performing operations on data
c) output – presenting the results
Input, Process and OutputQuestions:
Identify input, process and output based on the problem given.
Question 1
Find a student average mark given mark1 and mark2.
Input, Process and OutputQuestion 2
Calculate the salary of an employee who works hourly basis. The formula to be used is Salary = hour works * pay rate
Question 3
Calculate the total fine charged by library for
late-return books. The charge is RM0.20 for 1 day
Input, Process and Output
Question 4
You had bought a nice shirt which cost RM29.90
with 15% discount. Count the nett price for the shirt
Question 5
An electronics factory workers who are paid salaries by the number of hours worked is RM2.50 per hour. Total income earned will be cut by 10% for their KWSP contributions. Calculate the net income earned by an employee.
Input, Process and OutputQuestion 6
Mr. Kamal wish to buy USB storage Kingston brand to be circulated to DIP’s student. The Price for USB unit storage is RM40.00 each.
How many ringgit needs to be paid by Mr. Kamal to that shop owner after being given discount as much as 15%.
Input, Process and OutputAnswer:
Question 1
Input : mark1 and mark2
Process : calculate average mark using formula:
average mark=(mark1+mark2)/2
Output : average mark
Input, Process and Output• Answer:
• Question 2
Input: hour works, pay rate
Process: calculate salary using formula:
Salary= hour works x pay rate
Output: Salary
Input, Process and OutputAnswer:
Question 3
Input: days late
Process: calculate the total fine charged by
library using formula:
Total fine = days late x 0.20
Output: Total fine
Input, Process and OutputAnswer:
Question 4
Input: shirt cost
Process:
1. Calculate discount price using formula:
discount price = 0.15 x shirt cost
2. Calculate total price after discount using formula:
total price = shirt cost – discount price
Output: discount price, total price
Input, Process and OutputAnswer:
Question 5
Input: workers name, hours work
Process:
1. calculate the gross salary using formula:
Gross salary = hours work x 2.50
2. calculate KWSP using formula:
KWSP= 0.10 x Gross salary
3. calculate net income using formula:
net income= Gross salary-KWSP
Output: Gross salary, KWSP, net income
Input, Process and Output• Answer:
• Question 6
• Input: unit price, number of students
• Process:
• 1. calculate the actual price before discount using formula: actual price = unit price x number of students
• 2. calculate discount price using formula:
• discount price= 0.15 x actual price
• 3. calculate students price using formula:
• student price=(actual price-discount price)/number of students
• Output: actual price, discount price, student price