DCIT 22 Computer Programming 1 Lecture 2
DCIT 22 Computer Programming 1 Lecture 2
ALGORITHMS
DCIT 22 –
COMPUTER
PROGRAMMING 1
Algorithms are in everything we
An algorithm is the list of
do. But for those that aren’t
instructions and rules that a
inclined toward maths and
computer needs to do to
programming, the term
complete a task.
‘algorithm’ is less than clear.
DEVELOPING
ALGORITHMS
(In fact, the joke runs that
developers use the word So, you might have heard the
‘algorithm’ when they don’t term before, even used it. But
want to explain what they’ve what is an algorithm exactly?
done.)
In essence, algorithms are simply a series of instructions
that are followed, step by step, to do something useful or
solve a problem. You could consider a cake recipe an
algorithm for making a cake, for example.
• Types of Identifier
/ Division sum / 10
^ Exponentiation x^3
CLASSIFICATION OF OPERATORS
SYMBOL MEANING EXAMPLE • B. Rational - used to compare two
< Less than x<y
data values against each other and
<= Less than or equal to subjectLoad<=21 produce true or false results
> Greater than score>70
• A=B
• grade = 70
TYPES OF VARIABLE UTILIZED IN
AN ASSIGNMENT OPERATION
• Flowchart
It is a diagram representing the logical sequence in which a combination of steps operations is to be
performed.
Generally, flowchart contains all the three stages of data processing namely: Input, Process, and
Output.
It consists of labelled geometrical symbols that are interconnected to provide a pictorial representation
of a data processing procedure.
It is actually a visual representation of an algorithm.
FLOWCHARTING SYMBOLS