Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Name: Kyla Mae A.

Garcia
Course/Year/Section: BSIT-1B

Assessment 1

A. In three (3) sentences, in your own words, define and explain its importance in programming.
- Programming is how we communicate with machines in a way that makes them function how we
need them to. It directs a computer to complete commands so people do not have to do the task
repeatedly. Also, a way to understand codes.
B. Given the problems to be solved below, determine the needed input and output variables.

1. Compute for the average grade of Student A in her five (5) major subjects.
Let:
a, b, c, d, and e represents the grade of student A in her 5 major subjects.
average= student A in her 5 major subjects.
•Input Variable/s: a, b, c, d, e
•Output Variables: average

 Step 1: Start
Step 2: Initialize sum=0
Step 3: Input a, b, c, d, e
Step 4: Compute for the average,
average= a + b + c + d + e / 5
 Step 5 : Print average
 Step 6: End

2. Get the highest rating of the three (3) newly hired employees.
Let:
i, h, and j represents the ratings of the hired employees.
•Input Variable/s: i, h, j
•Output Variables: rating

 Step 1: Start
 Step 2: Initialize sum=0
 Step 3: Check if I is greater than h using <,>
Step 3.1: If true, check if i is greater than j
Step 3.1 1: If true, print I as highest rating.
Step 3.1 2: If false, print j as highest rating.
Step 3.2: Else, check if h is greater than j.
Step 3.2 1: If true, print h as highest rating,
Step 3.2 2: If false, print j as highest rating.
 Step 4: End

C. Write the algorithm of the problems stated in B.1 and B.2:

1. Compute the total amount to be paid by Customer X on the 7 products she ordered online.

Let:

a, s, d, f, j, k, l, and m represents the prices of the 7 products.

sum= the prices of the 7 products

 Step 1: Start
 Step 2: Initialize sum=0
 Step 3: Input a, s, d, f, j, k, l, m
 Step 4: Compute the total amount,
sum= a + s + d + f + j + k + l + m
• Step 5: Print sum
• Step 6: End

2. Compute for the average grade of Student A in her five (5) major subjects.

Let:

s1, s2, s3, s4, and s5 represents the average of Student A in her 5 major subjects.

 Step 1: Start
 Step 2: Initialize average=0
 Step 3: Input s1, s2, s3, s4, s5
 Step 4: Compute for the average,
average= s1 + s2 + s3 + s4 + s5 / 5
 Step 5: Print average
 Step 6: End

You might also like