Lesson1 (Part 2) - PLDL - Introduction To Program Logic Formulation and Program Coding
Lesson1 (Part 2) - PLDL - Introduction To Program Logic Formulation and Program Coding
Prepared by:
Raymond M. Cruz
OBJECTIVES
After the completion of the chapter, students will be able to:
1. Pseudocode
2. Flowchart FLOWCHART
END
DECISION MAKING START FLOWCHART
F
Print snum, “ is
greater than “,
fnum
END
START FLOWCHART
LOOPING
current_year=2020
PSEUDOCODE
Print “Enter your name:”, name. a
Step 1: Start
Step 2: Read current_year=2020 Print “Enter your birth
Step 3: Print “Enter your name:”, name year:”, birth_year.
Step 4: Print “Enter your birth year:”, birth_year
Step 5: The value of age is equal to current_year age = current_year – birth_year
minus birth_year.
Step 6: Print “Hi”, name, “! You are ”, age, “ years
old this year 2020.” Print “Hi”, name, “! You are ”,
age, “ years old this year 2020.”
Step 7: Print “Do you want to try again? (Y or N)”,
answer
Step 8: Check if answer is equals to ‘Y’. Print “Do you want to try again?
(Y or N)”, answer
Step 8.1: Then, go to Step 3.
Step 9: Else, print “Thank you!”
Step 10: End if T
answer a
== “Y”
F
1
LOOPING
PSEUDOCODE 1 FLOWCHART
Step 1: Start
Step 2: Read current_year=2020
Step 3: Print “Enter your name:”, name Print “Thank you!”
Step 4: Print “Enter your birth year:”, birth_year
Step 5: The value of age is equal to current_year
minus birth_year.
Step 6: Print “Hi”, name, “! You are ”, age, “ years END
old this year 2020.”
Step 7: Print “Do you want to try again? (Y or N)”,
answer
Step 8: Check if answer is equals to ‘Y’.
Step 8.1: Then, go to Step 3.
Step 9: Else, print “Thank you!”
Step 10: End
Thank you and God bless!
___