Professional Documents
Culture Documents
Table 1: Inputs
DESCRIPTION INPUT VARIABLES
ACTIVITIES A1, A2
EXAM SCORE ES
● Input must be in range of 50 to 100 only
Table 2: Processes
PROCESS VARIABLES
99 - 100 1.00
95 - 98 1.25
91 - 94 1.50
87- 90 1.75
83-86 2.00
79-82 2.50
76-78 2.75
75 3.00
Below 75 5.00
Table 5:
Description Function
Do the following:
1. Construct the flowchart, Pseudocode and code of the following
processes:
a. The system must accept values of Quizzes, Activities and
exam (based on the inputs on table 1 above)
b. Then execute all the process (based on table 2 above)
c. Display the Calculated Grade, the equivalent Grade (Based on
table 3, and Remarks (Based on table 4)
d. Then it will ask you if you want to “calculate grade again
press [Y] / any key to exit”, if Y then it will repeat the
process from the start otherwise it will terminate the
process.
FLOWCHART:
PSEUDOCODE:
Start
initialize again = "Y"
while again == "Y"
If True:
INPUT: Q1, Q2, Q3, A1, A2, ES
PROCESS:
AQ = (Q1+Q2+Q3)/3
AA = (A1+A2)/2
ER = ES + 50
QP = AQ * .20
AP = AA * .30
EP = ER * .50
sum = QP + AP + EP
OUTPUT: Equivalent_Grade()
If Process() >= 99 and Process() <= 100 is true
OUTPUT: Equivalent Grade: 1.00
Elif Process() >= 95 and Process() <= 98 is true
OUTPUT: Equivalent Grade: 1.25
Elif Process() >= 91 and Process() <= 94 is true
OUTPUT: Equivalent Grade: 1.50
Elif Process() >= 87 and Process() <= 90 is true
OUTPUT: Equivalent Grade: 1.75
Elif Process() >= 83 and Process () <= 86 is true
OUTPUT: Equivalent Grade: 2.00
Elif Process() >= 79 and Process() <= 82 is true
OUTPUT: Equivalent Grade: 2.50
Elif Process() >= 76 and Process() <= 78 is true
OUTPUT: Equivalent Grade: 2.75
Elif Process() == 75 is true
OUTPUT: Equivalent Grade: 3.00
Else:
OUTPUT: Equivalent Grade: 5.00
OUTPUT: Remarks()
If Process() >= 75:
OUTPUT: Remarks: Passed
Else:
OUTPUT: Remarks: Failed
OUTPUT:
Call function Process()
Call function Equivalent_Grade()
Call function Remarks()
INPUT: Value for again, Calculate Grade Again? Press [Y] / any
key to exit:
If False:
OUTPUT: Always do your best!
Stop
CODE (Copy paste not screen shot)
def Process():
AQ = (Q1+Q2+Q3)/3
AA = (A1+A2)/2
ER = ES + 50
QP = AQ * .20
AP = AA * .30
EP = ER * .50
sum = QP + AP + EP
return sum
def Equivalent_Grade():
again = "Y"
A1 = float(input("Activity 1: "))
A2 = float(input("Activity 2: "))