Professional Documents
Culture Documents
Chapter 1
Chapter 1
Chapter 1
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 2
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 3
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 4
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 5
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 6
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 7
PROGRAM DEVELOPMENT LIFE
CYCLE (PDLC) – EXAMPLE 1
Refer to the list of alphabets provided below:
M, F, A, C, T, P, G
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 8
PROGRAM DEVELOPMENT LIFE
CYCLE (PDLC) – EXAMPLE 1
Process 1: PROBLEM ANALYSIS
1. What is the input?
2. What is the desired output?
3. Formula?
4. What are the constraints/assumptions?
5. What is the expected output looks like?
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 9
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 10
What is an Algorithm?
https://youtu.be/cuhLSGGV-1k
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 11
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 12
The Characteristics of an Algorithm
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 13
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 14
PROGRAM DEVELOPMENT LIFE
CYCLE (PDLC)
▪ Pseudocode syntax:
INPUT – indicates a user will be inputting something
OUTPUT – indicates that an output will appear on the
screen
WHILE – a loop (iteration that has a condition at the
beginning)
FOR – a counting loop (iteration)
REPEAT – UNTIL – a loop (iteration) that has a
condition at the end
IF – THEN – ELSE – a decision (selection) in which a
choice is made
any instructions that occur inside a selection or
iteration are usually indented
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 15
PROGRAM DEVELOPMENT LIFE
CYCLE (PDLC)
Write a simple pseudocode to add TWO
numbers.
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 16
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 17
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 18
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 19
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 20
PROGRAM DEVELOPMENT LIFE
CYCLE (PDLC)
Write a simple flow
chart to add TWO
numbers.
CSC126: Fundamentals of Algorithms & Computer Problem Solving || DR. UNG LING LING 21
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 22
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 23
Do you have a QUESTION for me?
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 24
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 25
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 26
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 27
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 28
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 29
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 30
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 31
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 32
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 33
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 34
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 35
CSC126: Fundamentals of Algorithms & Computer Problem Solving || UNG LING LING 36