TTS_Module2-CC102
TTS_Module2-CC102
MODULE
College
INFORMATION SHEET PR-2.1.1
“Flowchart”
Flowchart
A type of diagram that represents an algorithm, workflow or process, showing the
steps as boxes of various kinds, and their order by connecting them with arrows.
Used of symbols and phrases to designate the logic of how a problem is solved
A common method for defining the logical steps of flow within a program by using a
series of symbols to identify the basic Input, Process and Output (IPO’s) function within
a program.”
A two-dimensional representation of an algorithm; the predefined graphic symbols of a
flowchart are used to indicate the various operations and the flow of control
A diagram representing the logical sequence in which a combination of steps or
operations is to be performed. it is a blueprint of the program.
Example of Flowchart:
How to make a cup of Tea:
Algorithm:
Step 1. Put water in kettle
Step 2. Put kettle on boil
Step 3. If water is boiled?
Put tea bag in a mug
Add water to mug
Leave 5 minute to boil
If water is not boiled?
Wait 5 sec.
Step 4. If Sugar Wanted, Add
sugar to cup, the proceed to step
5. If not proceed to step 5 also
Step 5. If Milk wanted, add milk
to cup, if not, End
Start
Algorithm:
Step 1. Read in the value of N.
Step 2. Print the value of N.
Read N
Print N
Stop
“Selection (If-then-else)/ Conditional Statement”
A
T
C
F
Arithmetic Operators
Operators Meaning
+ - Addition
- - Subtraction
* - Multiplication
/ - Division
Relational Operators
= - Equal
> - Greater than
< - Less than
<> - Not Equal
> - Greater than or Equal to
< - Less than or Equal to
Logical Operators
&& - AND
|| - OR
! - NOT
Examples:
1. Draw a flowchart that will input values for A and B. Compare two values inputted and
print which of the values is higher including the remark “ Higher”. Write its equivalent
algorithm.
Start Algorithm:
Step 1. Read in the value of A and B.
Step 2.Test if A is greater than B.
Step 3.If A is greater than B. A is higher. However,
Input A, B If A is less than B, B is higher.
Step 4. Print the number and the remark “Higher”
T
A>B Print A,
“Higher”
F
Print B,
“Higher” Stop
2. Draw a flowchart that will input a grade of student and determine whether the grade is
passed or failed. Print the name, grade and remarks of student. Write its equivalent
algorithm.
Algorithm:
Step 1. Initialize name and remarks into blanks.
Start
Step 2. Read in values for Grade and Name.
Step 3.Test if Grade is greater than or equal to 75.
Step 4. If Grade is greater than or equal to 75, remark
is “Passed”. However, if Grade is below 75, remark is
Name =””
“Failed”
Remarks =””
Step 5. Print the name, grade, and remarks
Grade T
Read Name,
Grade >75 Remarks = “Passed”
F
Print Name,
Remarks = “Failed” Grade, Stop
Remarks
“Repetition (Looping)”
Do – while -“this structure provides for the repetitive execution of an operation or routine
while the condition is true. The condition is evaluated before executing any process statement.
As long as the condition is true, the process is executed, otherwise, control flows out of the
structure”
F
C
Examples:
1. Construct a flowchart that will count from 1 to 10 and print each number counted using
the do-while-repetition structure. Write its equivalent algorithm.
Algorithm:
Start
Step 1. Initialize the value of C to 10.
Step 2.Test if C is less than 10.
Step 3.If C is less than 10, add 1 to the value of C,
C=0 print the value then go back to Step 2.
However, if C is greater than 10, stop
F
C < 10 Stop
T
C=C+1
Print C
Applications / Software:
MS Word
Internet Browser (ex. Google Chrome, Safari, Opera)
Procedure:
A. Create a flowchart of How To take a bath?
B. Write the equivalent algorithm
PRECAUTIONS:
Undertake final inspections to ensure the program conform to requirements
ASSESSMENT METHOD: PERFORMANCE TASK CRITERIA CHECKLIST
STUDENT NAME: __________________________________ SECTION: __________________
5 - Excellently Performed
4 - Very Satisfactorily Performed
3 - Satisfactorily Performed
2 - Fairly Performed
1 - Poorly Performed
_________________________________
TEACHER
Date: ______________________
STUDENT NAME: __________________________________ SECTION: __________________
PRECAUTIONS:
None
ASSESSMENT METHOD: WRITTEN WORK CRITERIA CHECKLIST
STUDENT NAME: __________________________________ SECTION: __________________
CRITERIA SCORING
Did I . . .
1 2 3 4 5
1. Observe safety precautions?
2. Use proper syntax?
3. Observed correctly the output?
TEACHER’S REMARKS: QUIZ RECITATION PROJECT
GRADE:
5 - Excellently Performed
4 - Very Satisfactorily Performed
3 - Satisfactorily Performed
2 - Fairly Performed
1 - Poorly Performed
_______________________________
TEACHER
Date: ______________________