FUNDAMENTALS OF PROGRAMMINGPROGRAMMING PREPARATION
COMPUTER WORKS? Machine CycleProgramming- process of givinginstructionProgram – instructions provided
STEPS IN SOLVING COMPUTER BASED- PROGRAM1. ANALYSE THE PROBLEM2. DESIGN A SOLUTION / PROGRAM3. CODE/ENTER THE PROGRAM4. TEST THE PROGRAM
STEPS IN SOLVING COMPUTER BASED-PROGRAMDESIGN A SOLUTION/PROGRAM 1. ALGORITHM 2. PSEUDOCODE
PROBLEM: To change the temperature inFahrenheit to Centigrade.ALGORITHM: PSEUDOCODE:1. subtract 32 1. Subtract the Value of F2. multiply the result in to 32. (1) by 5 2. Then Multiply the answer by 53. divide the result in (2) 3. Next is divide the by 9 result by 9 to get the4. write down the value of Centigrade answer.
STEPS IN SOLVING COMPUTER BASED-PROGRAMDESIGN A SOLUTION/PROGRAMAlgorithm 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
EXAMPLE OF ALGORITHMPROBLEM: Find the sum of two numbersALGORITHM:1. Add the two numbers together2. Write down the answer.
EXAMPLE OF ALGORITHMPROBLEM: To change the temperature in Fahrenheit to Centigrade.ALGORITHM: C = (F - 32) * 5/91. subtract 322. multiply the result in (1) by 53. divide the result in (2) by 94. write down the answer.
STEPS IN SOLVING COMPUTER BASED-PROGRAMPseudocode an algorithm in English statements in an outline form. is one of the methods that could be used to represent an algorithm
THREE METHODS USED IN CREATING AN ALGORITHMSTEPPING, LOOPING & CHOOSINGSTEPPING This is where all the instructions needed to solve our problem are set out one after the other.
EXAMPLE OF ALGORITHMPROBLEM: Find the average of four numbersALGORITHM:1. Add the four numbers2. Divide the result by 4 to get the average.3. Write down the answer