Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views2 pages

Prog2 Research2

The document outlines a research activity for a programming course, requiring students to create pseudocode and corresponding flowcharts for two tasks: calculating a final grade based on weighted components and calculating discounts based on transaction quantities. Students must hand-draw the flowcharts on short bond paper using specific color codes for text and highlights. The document includes detailed pseudocode for both tasks, specifying input, calculations, and outputs.

Uploaded by

johnmichaelangus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Prog2 Research2

The document outlines a research activity for a programming course, requiring students to create pseudocode and corresponding flowcharts for two tasks: calculating a final grade based on weighted components and calculating discounts based on transaction quantities. Students must hand-draw the flowcharts on short bond paper using specific color codes for text and highlights. The document includes detailed pseudocode for both tasks, specifying input, calculations, and outputs.

Uploaded by

johnmichaelangus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

COMPUTER

STUDENT NAME
STUDENT #
PROGRAMMING 2
:
:
DATE SUBMITTED
RATING
:
:
YEAR LEVEL : INSTRUCTOR :

RESEARCH ACTIVITY #2: PSEUDOCODE AND FLOWCHARTS

INSTRUCTIONS: Provided the Pseudocode, draw its equivalent flowchart. It is hand-drawn, black pen for the shapes, blue
pen for text and red pen for highlights important words or ideas. Use only short bond-paper for the research.

Note: Draw the Flowchart at the back of this page. No other paper will be use.
1. Final Grade Transmutation

BEGIN
// Input grades for each component
INPUT major_exam_grade
INPUT quizzes_grade
INPUT research_grade
INPUT laboratory_activity_grade
INPUT final_output_grade

// Weights for each component


major_exam_weight = 0.30
quizzes_weight = 0.30
research_weight = 0.10
laboratory_activity_weight = 0.15
final_output_weight = 0.15

// Compute weighted grades


major_exam_score = major_exam_grade * major_exam_weight
quizzes_score = quizzes_grade * quizzes_weight
research_score = research_grade * research_weight
laboratory_activity_score = laboratory_activity_grade * laboratory_activity_weight
final_output_score = final_output_grade * final_output_weight

// Compute total grade


total_grade = major_exam_score + quizzes_score + research_score + laboratory_activity_score + final_output_score

// Output total grade


PRINT "Total Grade: ", total_grade

// Determine student status


IF total_grade >= 75 THEN
PRINT "Status: Passed"
ELSE
PRINT "Status: Failed"
END IF
END

P a g e 1|2
COMPUTER
PROGRAMMING 2
Note: Draw the Flowchart at the back of this page. No other paper will be use.
2. Discount Calculation

BEGIN
// Declare variables
INTEGER number_of_transactions
INTEGER quantity
REAL price_per_item
REAL discount
REAL total_price
INTEGER transaction_index

// Input the number of transactions to process


INPUT number_of_transactions

// Loop through each transaction


FOR transaction_index FROM 1 TO number_of_transactions
// Input the quantity and price per item
INPUT quantity
INPUT price_per_item

// Determine the discount based on quantity


IF quantity >= 10 THEN
discount = 0.10 // 10% discount
ELSE IF quantity >= 5 THEN
discount = 0.05 // 5% discount
ELSE
discount = 0 // No discount
END IF

// Calculate the total price after discount


total_price = (price_per_item * quantity) * (1 - discount)

// Print the total price after applying the discount


PRINT "Total price after discount is", total_price

END FOR

// Optionally, you can add additional logic or output here if needed


PRINT "All transactions processed."

END

P a g e 2|2

You might also like