Вы находитесь на странице: 1из 7

CE0002L

(Computer Fundamentals and Programming)

SUMMATIVE

3
ALGORITHM, PSEUDOCODE AND
FLOWCHARTING

Escoto, John Henry A. Mr. Abraham Magpantay


October 4, 2020 October 5, 2020
I. OBJECTIVES

At the end of this exercise, students must be able to:

a) Define what is an algorithm


b) Know how to express algorithms using pseudo code, flowcharts, and programming
languages

II. BACKGROUND INFORMATION

Algorithm is the step-by-step sequence of instructions that describe how the data is to be
processed to produce the desired output

Algorithm can be expressed using the following:


 Natural Languages
 Pseudocode
 Flowcharts
 Programming Languages

Pseudocode is a program design technique that uses English words. Pseudocode cannot
be compiled nor executed, and there are no real formatting or syntax rules.

Flowchart is a graphical representation of an algorithm.

III. PROCEDURES

Write the algorithm and provide the pseudo code here, then draw the flowchart in Visual
Logic of the following program specifications

ACTIVITY 1.1: Converting Length in Feet to Centimeter

Write an algorithm, pseudocode and draw a flowchart to convert the length in feet to centimeter.
The input should come from the user.

Algorithm:
Step 1: Start
Step 2: Input the length in feet
Step 3: Multiply the length in feet by 30.48 to get length in centimeter
Step 4: Print length in centimeter
Step 5: Stop
Pseudo code:
Start
Input the length in feet (feet)
Compute the length in centimeter (centimeter) by multiplying length in feet (feet) by 30.48
Print length in centimeter (centimeter)
Stop

Draw the flowchart in Visual Logic and paste the screen shot of your work here
ACTIVITY 1.2: Equivalent grade of the student

Write an algorithm and draw a flowchart that will read grades of two students. The program
should find out if the grade is passing or not. The passing grade is 75. If the grade is 75 or more it
should output that the grade is passed, otherwise output that the grade is failed.

Algorithm
Step 1: Start
Step 2: Input grade of the first student.
Step 3: Input grade of the second student.
Step 4: If the grade of the first student is greater than 74, print “The first student passed”
Step 5: If the grade of the first student is lower than 75, print “The first student failed”
Step 6: If the grade of the second student is greater than 74, print “The second student passed”
Step 7: If the grade of the second student is lower than 75, print “The second student failed”
Step 8: Stop

Pseudo code:
START
INPUT first student grade (grade1)
INPUT second student grade (grade2)
IF grade1 > 74, THEN
DISPLAY “The first student passed.”
ELSE,
DISPLAY “The first student failed.”
ENDIF
IF grade2 > 74, THEN
DISPLAY “The second student passed.”
ELSE,
DISPLAY “The second student failed.”
ENDIF
STOP
Draw
the

flowchart in Visual Logic and paste the screen shot of your work here

ACTIVITY 1.3: Age Equivalent

Write an algorithm and draw a flowchart that reads the age of a persons. Check if the age is in this
category
If age is
Less than 0, output error, age is not allowed
0 to 12, output “Child”
13 to 19, output “Teenager”
20 to 30, output “Young adult”
31- 59, output “Adult”
60 and above, output “Senior”

Algorithm
Step 1: Start
Step 2: Input age
Step 3: If the age is below 0, print “Age is not allowed”
Step 4: If the age is between 0 – 12, print “Child”
Step 5: If the age is 13 – 19, print “Teenager”
Step 6: If the age is 20 – 30, print “Young Adult”
Step 7: If the age is 31 – 59, print “Adult”
Step 8: If the age is above 60, print “Senior”
Step 9: Stop
Pseudo code:
START
INPUT age (age)
IF age < 0, THEN,
DISPLAY “Age is not allowed”
ELSEIF, age > 0 & age < 12, THEN,
DISPLAY “Child”
ELSEIF, age > 13 & age < 19, THEN,
DISPLAY “Teenager”
ELSEIF, age > 20 & age < 30, THEN,
DISPLAY “Young Adult”
ELSEIF, age > 31 & age < 59, THEN,
DISPLAY “Adult”
ELSEIF, age => 60, THEN,
DISPLAY “Senior”
ENDIF
STOP

Draw the flowchart in Visual Logic and paste the screen shot of your work here
IV. ASSESSMENT

Department Computer Science Department


Subject Code CE0002L
Description Computer Fundamentals and Programming
Term/Academic Year 1 / 2020-2021

Topic Introduction to Programming


and Algorithm
Lab Summative 3
No.
Lab Summative Algorithm, Pseudocode and
Flowcharting
CLO 1

Note: The following rubrics/metrics will be used to grade students’ output in the Lab
Summative 3.

Criteria Descriptions Points


Correctness of the pseudocode The algorithm and the pseudocode are 30
and algorithm done correctly and has really listed all
the steps in solving the problem
Correct use of flowchart The flowchart created uses correct 30
symbols symbols to represent a line or lines of
pseudocode
Correct flow of data and The flowchart should have the correct 40
process flow of data and process from
beginning to end
Total 100%

Вам также может понравиться