Professional Documents
Culture Documents
PROGRAMMING
CHAPTER 1 :
INTRODUCTION TO PROGRAMMING
?
?
?
Intro to Computer Progra 5
Computer program Source code
Programmer
What ?
Computer Programming ?
How to program ?
Requires knowledge in the application domain
Follow the steps in software development method
Programming Language
?
Function?
Method of communication for which
computers could understand and execute
the instructions written in source code.
Machine language
Computer programmer
How ?
person
se
u Programmer
INPUT OUTPUT
PROCESS
Data
A collection of
unprocessed items
e.g: text, numbers,
images, audio and
video
Information
result of processing,
manipulating and
organizing data in a way
that adds to the
knowledge of the
receiver
Design algorithm
Implement algorithm
Algorithm design
Pseudocode Flowchart
number2 )
Process : total = number1 + number2
Output : sum or total of two numbers
End
1. Input:
value of x = 10 and value of a= 12
2. Formula/process:
y = 2x + a - 6
3. Output:
value of y
Intro to Computer Progra 42
Answer : Example B
Statement_n Statement..n
end
Print total
End
while condition
loop-body
end_while
Phase 2 :
Data requirements :
Input : test_score
Output : PASS or FAIL
Relevant formula : test_score >= 50
test_score < 50
Constrain : the test score must greater than 0 (zero)
Begin
Read the test scores
Begin while
while test_score < 0
Print Re-enter your score and must greater than
0
Read the test_score
End while
if test_score >= 50
print PASS
else
print FAIL
End