4. What is programming?
• A computer program is a collection of instructions that
performs a specific task when executed by a computer
• A computer requires programed to function
• Executes the programs instructions in the CPU
5. Software
• Set of instructions or program that says a System to perform a
task
6. Phases of program
1. Problem identification
2. Preparing algorisms and flowchart
3. Coding
4. Translartion
5. Debugging
6. Execution & test
7. Documentation
7. Problem Identification
• Here we identify the problems
It involves two major steps:
• identifying inputs, processing steps and outputs
• split the large problem into a series of sub-problems (structured
diagram).
8. Algorithms
• An algorithm is a procedure in problem solving. It involves a
series of steps.
• One of the major problem in algorithm is Danger of making
errors.
9. Example
• Q:print the average of three numbers
Step 1: START
Step 2: Enter A,B,C
Step 3: avg=(a+b+c)/3
Step 4:print average
Step 5: STOP
14. Pseudo code
• Pseudo code is a description of what a computer program or
algorithm must do, expressed in a formally-styled natural
language rather than in a programming language. Pseudo
code is sometimes used as a detailed step in the process of
developing a program.
15. • Examples:
• 1.. If student's grade is greater than or equal to 60
• Print "passed"
• else
• Print "failed"
• 2
16. Coding
• A set of instructions expressed in any programing language is
known as code
• Writing a code is called coding
• he process of designing, writing, testing, and maintaining the
source code of computer programs.
• We develop the code with the help of flowchart
17. Example ( in c )
#include<stdio.h>
Void main()
{
Int A,B,C;
Scanf(“%d,%d,%d”,&A,&B,&C);
Avg=(A+B+C)/3;
printf(“%d”,avg);
}
Start
Input
A,B,C
Avg=(A+B
+C)/3
Print
Averag
e
stop
OUTPUT
2 4 6
3
18. TRANSLATION/COMPLATION
• The process to convert the written program from high level
language to low level language
Source
code
compil
er
Machine
language
19. Debugging
• Process that detect the problems or errors in a code
Types of Errors
• Syntax error
• Logical error
• Runtime error