2. COMPUTER WORKS?
Machine Cycle
Programming- process of giving
instruction
Program – instructions provided
3. STEPS IN SOLVING COMPUTER BASED-
PROGRAM
1. ANALYSE THE PROBLEM
2. DESIGN A SOLUTION /
PROGRAM
3. CODE/ENTER THE
PROGRAM
4. TEST THE PROGRAM
4. STEPS IN SOLVING COMPUTER BASED-PROGRAM
DESIGN A
SOLUTION/PROGRAM
1. ALGORITHM
2. PSEUDOCODE
5. PROBLEM: To change the temperature in
Fahrenheit to Centigrade.
ALGORITHM: PSEUDOCODE:
1. subtract 32 1. Subtract the Value of F
2. multiply the result in to 32.
(1) by 5 2. Then Multiply the
answer by 5
3. divide the result in (2)
3. Next is divide the
by 9 result by 9 to get the
4. write down the value of Centigrade
answer.
6. STEPS IN SOLVING COMPUTER BASED-PROGRAM
DESIGN A SOLUTION/PROGRAM
Algorithm
A step-by-step set of instructions for
solving a problem in a limited number of
steps. The instructions for each step are
exact and precise and can be carried out
by a computer.
A logical procedure or set of steps to
be followed to arrive at a solution to a
problem.
gives a solution to a particular problem
7. EXAMPLE OF ALGORITHM
PROBLEM: Find the sum of two numbers
ALGORITHM:
1. Add the two numbers together
2. Write down the answer.
8. EXAMPLE OF ALGORITHM
PROBLEM: To change the temperature in
Fahrenheit to Centigrade.
ALGORITHM: C = (F - 32) * 5/9
1. subtract 32
2. multiply the result in (1) by 5
3. divide the result in (2) by 9
4. write down the answer.
9. STEPS IN SOLVING COMPUTER BASED-PROGRAM
Pseudocode
an algorithm in English statements in an
outline form.
is one of the methods that could be used to
represent an algorithm
10. THREE METHODS USED IN CREATING AN
ALGORITHM
STEPPING, LOOPING & CHOOSING
STEPPING
This is where all the instructions needed to
solve our problem are set out one after the
other.
11. EXAMPLE OF ALGORITHM
PROBLEM: Find the average of four numbers
ALGORITHM:
1. Add the four numbers
2. Divide the result by 4 to get the
average.
3. Write down the answer