PSPD Bab2 (IPO) PDF
PSPD Bab2 (IPO) PDF
(part 3)
What is What is
problem? problem
solving?
any thing, matter,
person, etc., that is the process of
is difficult to deal transforming the
description of a
with, solve, or
problem into the
overcome.
solution
By using our knowledge of By relying on our ability to Problem solving may include
the problem select and use appropriate mathematical or systematic
problem-solving techniques operations and involve critical
and tools thinking and logic skills.
People
If a programmer cannot understand
see whatisthey
what a program can
doing, shesee.
can't understand it.
1 2 3 4
Fundamentals
Topic 2 : Problem of a computer
Solving Methods
It needed an
input
Store it in memory(in
case it needed it)
Storage
STEPS involve in Problem Solving
1 2 3 4
Identify the Identify other Identify what Write an
inputs and data and needs to be algorithm.
outputs constants computed.
required to
solve the
problem.
This sub-topic focuses on
PLC : Phase 2
< Analyzing the problem >
Phases in programming life cycle
Phases
1 2 3 4 5 6 7
Documentation
Implement the
Analyze the
Update the
Maintain &
Specify the
Design the
algorithm
algorithm
program
program
problem
problem
No ITEM I/P/O
1 Validate and process type of account
2 ATM pin number
3 Type of transaction
4 Monitor show balance in user’s account
5 Identify balance amount in the account
6 Amount of money to withdraw
7 Type of account
8 Money
9 Validate pin number
10 Deducts the withdrawal from the user’s account
11 Receipt
• Below are an example scenario of a
user using an ATM machine
Activity 1 • Select the appropriate instruction by
categorizing them into input, process
and output.
No ITEM I/P/O
1 Validate and process type of account P
2 ATM pin number I
3 Type of transaction I
4 Monitor show balance in user’s account O
5 Identify balance amount in the account P
6 Amount of money to withdraw I
7 Type of account I
8 Money O
9 Validate pin number P
10 Deducts the withdrawal from the user’s account P
11 Receipt O
Complete the activity in LMS (CIDOS)
Problem statement:
• Input : ?
• Process : ?
• Output : ?
Example 1
Problem statement:
Problem statement:
Problem statement:
• Write a program that will receive 3 numbers as input from the users.
Find the average and display the three numbers and its average.
3 numbers
receive from Program that Display the THREE
user written to process numbers user have
the total of 3 input entered
numbers user
enter Display the AVERAGE
of three numbers
user have entered
Example 3
Problem statement:
• Write a program that will get current year and birth year. Find
the age of the person and display the age of the person.
Sub - Topic :
Algorithm Paterns