Six Steps of Problem Solving

  1. Identify the problem
  2. Understand the problem
  3. Identify alternative ways to solve the problem
  4. Select the best way to solve the problem from the list of alternative solutions
  5. List instructions that enable you to solve the problem from the list of alternative solutions
  6. List instructions that enable you to solve the problem using the selected solution.
  7. Evaluate the solution

Algorithmic solutions is are those which can be solved using a specific amount of steps and are not dependent on senses, experience, perception or opinions

What problem can be solved by computer ?

  • When the solution can be produced by a set of step-by-step procedures or actions.
  • This step-by-step action is called an algorithm.
  • The algorithm will process some inputs and produced output.
  • Solving problem by computer undergo two phases:
    • Phase 1:
      • Organizing the problem or pre-programming phase.
    • Phase 2:
      • Programming phase.

Pre Programming Phase

  1. Analyzing the problem.
  2. HIPO Hierarchy Input Process-Output or PAC Programming Analysis Chart (PAC)
  3. Developing the Input-Process-Output (IPO) Chart.
  4. Drawing Program flowcharts.
  5. Writing Algorithms.

PAC Problem Analysis Chart

  • Emphasis on Data? eg
DataProcessingOutput
Hours work, pay rateSalary = Hours work * payrateSalary

Input Process Output (IPO) Chart

• Extends and organizes the information in the Problem Analysis Chart. • It shows in more detail what data items are input, what are the processing or modules on that data, and what will be the result or output. • It extends information from PAC. eg

InputProcessingModuleOutput
- Hours Worked- Enter Hourly Worked1100- Net pay
- PayRate- Enter Pay Rate1200
- Deductions- Calculate Gross Pay1000
- Enter Deductions2100
- Calculate Net Pay2000
- Print cheque3000
- End0000
  • Emphasis on Input

Q Write a Input Process Output (IPO) to convert the distance in miles to kilometers where 1.609 kilometers per mile

InputProcessingModuleOutput
- Distance in Miles- Enter Distance1000- Distance in kilometers
- Kilometer = 1.609 x distance2000
- Display Kilometers3000

Q Write a input process Output (IPO) to find an area of a circle where area = pi * radius * radius

InputProcessingModuleOutput
- radius- Enter Radius1000- Area of a circle
- Area = 3.14 x Radius x Radiu2000
- Display area3000
- End0000

Question

Q Write an Input Process Output (IPO) that asks a user to enter the distance of a trip in miles, the miles per gallon estimate for the user’s car, and the average cost of a gallon of gas. Calculate and display the number of gallons of gas needed and the estimated cost of the trip

PAC

DataProcessingOutput
distance, miles_per_gallon, cost_per_gallon inputted by userEnter cost_per_gallongallons
Enter distancecost
Enter miles_per_gallon
- Calculate gallon = distance/miles_per_gallon
- Calculte cost = gallon * cost_per_gallon

IPO

InputProcessingModuleOutput
distanceEnter miles_per_gallon1100gallons
miles_per_gallonEnter distance1200cost
cost_per_gallon- Calculate gallon = distance/miles_per_gallon1000
Enter cost_per_gallon2100
- Calculte cost = gallon * cost_per_gallon2000
Display gallons3000
Display cost4000
End0000

Flowchart

%%🖋 Edit in Excalidraw, and the dark exported image%%

Question

Make a calculator that demands two numbers, and outputs. +, -, *, \of the two

InputProcessingModuleOutput
num1Enter num11100subtraction
num1Enter num21200addition
- Calculate subtraction = num1 - num21300multiplication
- Calculate addition = num1 + num21400division
- Calculate multiplication = num1*num21500
- Calculate division = num1/num21600
Display subtraction, addition, multiplication, division2000
End0000

Question

Simple calculation of volume

InputProcessingModuleOutput
set height = 251100volume
set length = 401200
set width = 181300
Calculate 2000
Display vol3000
End0000

Question

Calc of Hyp using side1 and side2

InputProcessingModuleOutput
set side1 = 101100hyp
set side2 = 81200
Calculate 2000
Display hyp3000
End0000