Understanding Computer Programming 9&10
Understanding Computer Programming 9&10
COMPUTER
PROGRAMMING
LESSON 1
Let’s Discover
Flowchart- is a diagram
that represents the
algorithm. It contains
various shapes connected
by arrows.
COMMONLY REPRESENTED IN TWO WAYS:
COMMONLY REPRESENTED IN TWO WAYS:
Pseudocode- is a detailed
description in an easily
understandable language,
usually in English, and not in a
complicated programming
language.
COMMONLY REPRESENTED IN TWO WAYS:
EXAMPLE: DISPLAY THE SUM OF TWO
NUMBERS
START
Input # 1
Input # 2
Sum = # 1 + # 2
Print sum
End
-In both illustrations, the algorithm for the
problem is shown. The users inputs or enter
two numbers assigned as number 1 and
number 2 respectively. The sum of both
number 1 and number 2 calculated and
stored as sum. The program displays the
value of the sum, and the program is
executed.
3. Coding
-After developing the program’s
algorithm, we proceed to the actual
coding of the program. We have
previously defined a program as a set
of instructions. For the computer to
understand these instructions, we use
programming languages.
3. Coding
-In this phase, we use a
programming language to
“communicate” with the
computer. Programming
languages are also referred to
as codes.
Examples of Programming Languages:
1st Statement
Do…
2nd Statement
3rd Statement Rinse
etc…
2. Conditional
Structure
-Also known as decision-
making structure, some
instructions may involve
decisions or conditions
before they are executed.
Conditional Structure
STRUCTURED
ENGLISH
Conditio
n
IF condition
Do… Do… THEN do
statement
Do statement
END IF
EXAMPLE:
Drive car
No
Light is
Red? Go
Yes
Stop
3. Iterative Structure
(looping)
-A certain set of
instructions is repeated
or looped a certain
number of times
Ethics in Computer
Programming
-Students and professionals
in computer programming
are expected to follow
ethical guidelines in
developing programs.
Ethics in Computer
Programming
-By following these
guidelines, programmers can
share good practices and
exhibit professionalism
toward another programmers.
Ethics in Computer
Programming
1. Contribute to society and
human well-being,
acknowledging that all
people are stakeholders in
computing
EXPLANATION
-A programmer must strive
to ensure the programs
they create will be used in
socially responsible ways.
Ethics in Computer
Programming
2. Avoid harm
to others
EXPLANATION
-A programmer must consider the
design, implementation, use, and
removal of software when making
decisions. He must follow the
standards of system design and
testing.
Ethics in Computer
Programming
3. Be honest
and trustworthy
EXPLANATION
-A programmer should
always be honest about his
or her system design,
including the problems and
limitations.
Ethics in Computer
Programming
-A programmer should
not violate copyright
law and give credit to
where it is due.
Ethics in Computer
Programming
6. Respect
Privacy
EXPLANATION
-A programmer should also
establish procedures to
allow the person to review
his or her personal data.
Ethics in Computer
Programming
7. Honor
Confidentiality
EXPLANATION
-A programmer should not
share personal
information of employers,
clients and users.
EXPLANATION
This principle pushes for the
nondisclosure of the nature
and content of any
information to appropriate
authorities.