ICT4
ICT4
COMMUNICATIONS
TECHNOLOGY IV
Concepts of Computer
Programming
A computer is an electronic device
that accepts data from the user,
processes it, produces results,
displays them to the users, and
stores the results for future usage.
How Humans Communicate with
Computers
Machine Language
(Binary 1,0)
Instructions
Programming
Language
Human Machine
Machine Language
Sometimes referred to as machine
code or object code, machine language is a
collection of binary digits or bits that the
computer reads and interprets. Machine
language is the only language a computer is
capable of understanding.
● Programming language is a set of words,
symbols and codes that enable human to
communicate with computers. There is a lot
of programming languages that exist
1. Scalability
It aids in your understanding of scalability. When you have a sizable
real-world problem, you must break it down into small steps to
analyze it quickly.
2. Performance
The real world is challenging to break down into smaller steps. If a
problem can be easily divided into smaller steps, it indicates that the
problem is feasible.
Consider the process of cooking rice. Cooking is the
process carried out by a cook using the ingredients with
the help of utensils, cookers, oven and a recipe. The
ingredients are the inputs to the process, the cooked rice
is its output, and the recipe is its algorithm. That is, an
algorithm prescribes the activities that constitute a
process. The recipes (algorithms) are grouped under the
term software, whereas the utensils, cookers, and oven
are grouped under hardware. The process of cooking is
depicted in example no. 1.
Example 1: Let us look at a recipe for
cooking rice. It consists of the following
simple activities:
Examples:
1.. If student's grade is greater than or equal to 60
Print "passed"
else
Print "failed"
Example 2: Calculate the Average of Five Numbers
START
INPUT five numbers and store them in variables num1, num2,
num3, num4, and num5
CALCULATE the sum of the five inputted numbers and store
them in variable sum
CALCULATE the average of the five inputted numbers and
store them in variable avg
PRINT the value of the variable avg
END
Advantages of Pseudocode
There are several advantages inherent to pseudocode
and its use. Some of these include:
Pseudocode is a simple way to represent an
algorithm or program.
It is written easily in a word processing application
and easily modified.
Pseudocode is easy to understand and can be
written by anyone.
Pseudocode can be used with various structured
programming languages.
Two Kinds of Programming Languages