ITskills Unit 1
ITskills Unit 1
ITskills Unit 1
Computer Programming is a step by step process of designing and developing various sets of computer
programs to accomplish a specific computing outcome. The process comprises several tasks like analysis,
coding, algorithm generation, checking accuracy and resource consumption of algorithms, etc.
A computer program is a sequence of instructions written using a Computer Programming Language to
perform a specified task by the computer.
The two important terms that we have used in the above definition are −
● Sequence of instructions
● Computer Programming Language
If you understand what a computer program is, then we will say: the act of writing computer programs is called
computer programming.
There are hundreds of programming languages, which can be used to write computer programs and
following are a few of them −
● Java
●C
● C++
● Python
● PHP
● Perl
● Ruby
Basics of programming
Just like human languages, programming languages also follow grammar called syntax. There are certain basic
program code elements which are common for all the programming languages.
Most important basic elements for programming languages are:
● Programming Environment
● Data Types
● Variables
● Keywords
● Logical and Arithmetical Operators
● If else conditions
● Loops
● Numbers, Characters and Arrays
● Functions
● Input and Output Operations
Algorithm
Algorithm is a step-by-step procedure to resolve any problem. An algorithm is an effective method expressed as
a finite set of well-defined instructions.
Algorithms are generally created independent of underlying languages, i.e. an algorithm can be implemented in
more than one programming language. From the data structure point of view, following are some important
categories of algorithms −
Hence, many solution algorithms can be derived for a given problem. The next step is to analyze those
proposed solution algorithms and implement the best suitable solution.
Example: Design an algorithm to add two numbers and display the result.
Flowchart
Flowchart is a diagrammatic representation of sequence of logical steps of a program.
Flowchart is a graphical representation of an algorithm. Programmers often use it as a program-planning tool to
solve a problem. It makes use of symbols which are connected among them to indicate the flow of information
and processing.
The process of drawing a flowchart for an algorithm is known as “flowcharting”. Flowcharts use simple
geometric shapes to depict processes and arrows to show relationships and process/data flow.
Flowchart Symbols
Here is a chart for some of the common symbols used in drawing flowcharts.
1. Start
2. Input A,B,C
3. If (A>B) and (A>C) then print “A is greater”.
Else if (B>A) and (B>C) then print “B is greater”.
Else print “C is greater”.
4. Stop
Flowchart:
1. Start
2. Read a,b,c
3. If (a<b) and (a<c) then print “a is smaller”.
Else if (b<a) and (b<c) then print “b is smaller”.
Else print “c is smaller”.
4. Stop
Flowchart:
Step 1 : Start
Step 2 : Assign sum=0 and i=0
Step 3 : Read limit of number , n
Step 4 : Repeat steps 5 to 6 until i=n reached
Step 5 : Compute sum=sum+i
Step 6 : Compute i=i+1
Step 7 : Print sum
Step 8 : Stop
Flowchart: