It103 Week1
It103 Week1
It103 Week1
Eugene Perez
A program is a set of instructions that tell the
computer to do various things; sometimes the
instruction it has to perform depends on what
What is
happened when it performed a previous
Programming? instruction.
Programming 2.0
4.0
Cycle Planning
Checking
out the
the Solution
Program
3.0
Coding the
Solution
1. Defining the Problem
Understand the problem. The
programmer cannot start without
understanding the problem
2 Types of Errors
Program Cycle
a. Syntax Errors – occur in coding the data
b. Logical Errors – errors which are hard to detect. They
occur because the programmer does not thoroughly
understand a phase of the problem to be solved.
Algorithm
Algorithms are essential to the way computers process
data. Many computer programs contain algorithms that
detail the specific instructions a computer should
perform (in a specific order) to carry out a specified
task, such as calculating employee’s paychecks or
printing student’s report cards.
Three Categories of Algorithmic Operations/Logic or
Control Structures:
1. Sequential Operations – Instructions are executed in
order.
2. Selection / Conditional (“question asking”)
Algorithm operations – a control structure that asks a true/false
question and then selects the next instruction based
on the answer.
3. Repetitional/ Iterative operations (loops) – a control
structure that repeats the execution of a block of
instructions
Programs are written using three basic
structures
Sequence
Used in every program you write
Algorithm Repetition
Used in most programs you write
Selection
Used in most programs you write
3. Flowchart
Graphical representation of the sequence of operations
in an information system or program.
An artificial and informal language that helps programmers
Pseudocode develop algorithms.
Pseudocode is a “text-based” detail (algorithmic) design
tool
A graphical representation of an algorithm
A diagram representing logical sequence in which a
combination of steps or operations is to be performed
A pictorial representation in solving a problem.
Types of Flowchart
Flowchart 1. Program Flowchart
Describes graphically in detail the logical operations and
steps within a program and the sequence in which these steps
are to be executed.
2. System Flowchart
A graphic representation of the procedures involved in
converting data on input media into output form.
Little is shown about how processing will be accomplished.
Any letter, or combination of letters and digits to store data
or result of computation process.
Processing
Used to represent a group of program instructions that perform a
processing function such as arithmetic operations.
Preparation/Initialization
Used to represent a group of program instructions that will alter or
modify a program’s course of execution, and is used to initialize
values.
Decision
Denotes a point in the program where more that one path can be
taken.
On Page Connector