Thursday, 26 April 2018
CLASS: SS2 WEEK/PERIOD FIVE/1ST & 2ND LESSON TOPIC/TITLE ALGORITHM AND FLOW CHART
CONTENT
To make a computer do anything you have to write a computer program. To write a computer program you have to tell the computer, step by step exactly what you want it to do.
Definition
An Algorithm can be defined as the set of rules and sequential steps that define how a particular problem can be solved in finite and ordered sequence.
An Algorithm written in a computer is called a program. Simply speaking an Algorithm is called the heart of programing. An Algorithm describes a method by which a given task is accomplished.
A Flow Chart is the pictorial representation in which symbols are used to show the various operations and decisions to be followed in solving a problem.
FUNCTIONS OF ALGORITHMS
An Algorithm generally takes some input, carries out a number of effective steps in a finite amount of time, and produces some output
CHARACTERISTICS OF ALGORITM
1. UNAMBIGUOUS: It should state clearly what each line of the Algorithm does
2. DEFINITE AND EFFECTIVE: This implies the successful termination of the program.
Thus every Algorithm should have the following characteristics
1. Input
2. Output
3. Definiteness
4. Effectiveness
5. Termination
An Algorithm uses the words BEGIN start and END to end
BEGIN(start of algorithm)
Step1
Step2
Step3
………….
…………..
Step n
END(END OF ALGORITHM)
An algorithm to print ten odd numbers
Input : the start number
Output: First ten odd numbers
STEPS:
1. Let the first number be n
2. n =1
3. Print n
4. Count c =1
5. Add 2 to n
6. Add 1 to c
7. Is c > 10 : Go to step 5
8. Stop
9. End algorithm
An algorithm to print average of given sets of numbers
Input: read the value of n where n is the total numbers we have
Output: the average of numbers
STEPS:
1. Read n
2. I =1, sum =0
3. If i>n go to 9
4. Read the value of X
5. SUM =SUM +x
6. I =I +1
7. Go to 3
8. Average = SUM/ n
9. Print Average
10. End
Subscribe to:
Post Comments (Atom)
We Provided Epson Maintenance Reset Utility
ReplyDeleteAdjustment Program Full Free ! No Need Any Cost
Please can you help explain the procedure??
ReplyDeleteAm new to flowcharts and algorithm
Pls where can I learn flowcharts and algorithm..it's kind of confusing
ReplyDelete