NOTE #1 Procedural Programming
NOTE #1 Procedural Programming
Introduction
A computer is a machine that performs a variety of tasks according to specific
instructions. It is a data processing machine which accepts data via an input device and
its processor manipulates the data according to a program.
The computer has two major components. The first one is the Hardware which is the
tangible part of the computer. It is composed of electronic and mechanical parts. The
second major component is the software which is the intangible part of a computer. It
consists of data and the computer programs.
Page 1 R.Vijay
moving data into and out of the system. Examples of input devices are
keyboards, mice and microphones. Examples of output devices are monitors, printers
and speakers.
Software
Software is the program that a computer uses in order to function. It is kept on some
hardware device like a hard disk, but it itself is intangible. The data that the computer
uses can be anything that a program needs. Programs acts like instructions for the
processor.
Some Types of Computer Programs:
1. Systems Programs
Programs that are needed to keep all the hardware and software systems running
together smoothly
Examples:
Operating Systems like Linux, Windows, UNIX, Solaris, MacOS
2. Application Programs
Programs that people use to get their work done
Examples:
Word Processor
Game programs
Spreadsheets
3. Compilers
The computer understands only one language: machine language. Machine language is
in the form of ones and zeros. Since it is highly impractical for people to create programs
out of zeros and ones, there must be a way of translating or converting a language which
we understand into machine language, for this purpose, there exists compilers.
Page 2 R.Vijay
Page 3 R.Vijay
Page 4 R.Vijay
Page 5 R.Vijay
Page 6 R.Vijay
Page 7 R.Vijay
Page 8 R.Vijay
Questions Time?
Question 1
The flow chart below is meant to show the stepsfor making and drinking a glass of
blackcurrant squash.
Place the instructions below in the flow chart. Make sure you put the instructions in the
correct order.
Page 9 R.Vijay
Question 2
The flow chart on the right is meant to show the steps for safely crossing the road.
There is a decision box in this flow chart.
Place the boxes below in the flow chart.
Question3
Write a pseudocode to print the grade of students according to their final marks. Criteria
is as follows:
Marks
>=75 and <=100
>=60 and <75
>=40 and <60
<40
Grade
Distinction
Merit
Pass
Fail
Page 10 R.Vijay