2. WHAT IS AN ALGORITHM
The word “algorithm” means a procedure or a technique.
An algorithm is a sequence of steps to solve a particular problem or algorithm is an ordered set of
distinct steps that produces a result
•Input: An algorithm may or may not require input
•Output:Each algorithm is expected to produce at least one result
3. EX: ALGORITHM TO MAKE TEA
Put the teabag in a cup.
Fill the kettle with water.
Boil the water in the kettle.
Pour some of the boiled water into the cup.
Add milk to the cup.
Add sugar to the cup.
Stir the tea.
Drink the tea.
4.
5.
6. WHAT IS A FLOWCHART?
Flowchart is diagrammatic /Graphical representation of sequence of steps to solve a
problem.
A flowchart is pictorial representation of algorithm. It is a means of visually presenting the
flow of data, the operations performed and sequence of operations to solve a problem.
7. Advantages of flowchart
:•Flowchart is an excellent way of communicating the logic of a program.
•Easy and efficient to analyze problem using flowchart.
•During program development cycle, the flowchart plays the role of a blueprint, which
makes program development process easier.
•After successful development of a program, it needs continuous timely maintenance
during the course of its operation. The flowchart makes program or system maintenance
easier.
•It is easy to convert the flowchart into any programming language code.
8.
9.
10.
11.
12. PROGRAM DEBUGGING
Program errors are known as bugs and the process of detecting and
correcting these errors is called debugging.
Debugging is the process of locating and eliminating program errors.
13. TYPES OF ERRORS
1. SYNTAX ERRORS: syntax errors result when syntax or rules of
programming language are not followed such as incorrect punctuation,
incorrect word sequence, undefined terms or misuse of terms. These errors
are detected by the compiler.
2. LOGICAL ERRORS: A logic error (or logical error) is a 'bug' or mistake
in a program's source code that results in incorrect or unexpected
behaviour.
3. RUN TIME ERRORS: runtime error that may simply produce the wrong
output or may cause a program to crash while running.